class MachineInstr;
class Instruction;
class Value;
+class CallArgsDescriptor;
extern AnnotationID MCFI_AID;
class MachineCodeForInstruction : public Annotation {
- std::vector<Value*> tempVec; // used by m/c instr but not VM instr
- std::vector<MachineInstr*> Contents;
+ std::vector<Value*> tempVec; // used by m/c instr but not VM instr
+ std::vector<MachineInstr*> Contents; // the machine instr for this VM instr
+ CallArgsDescriptor* callArgsDesc; // only used for CALL instructions
public:
MachineCodeForInstruction() : Annotation(MCFI_AID) {}
~MachineCodeForInstruction();
tempVec.push_back(tmp);
return *this;
}
+
+ void setCallArgsDescriptor(CallArgsDescriptor* desc) { callArgsDesc = desc; }
+ CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; }
};
#endif
#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineInstr.h"
+#include "llvm/CodeGen/MachineInstrAnnot.h"
#include "llvm/CodeGen/InstrSelection.h"
AnnotationID MCFI_AID(
// Free the MachineInstr objects allocated, if any.
for (unsigned i=0, N = size(); i < N; i++)
delete (*this)[i];
+
+ // Free the CallArgsDescriptor if it exists.
+ if (callArgsDesc)
+ delete callArgsDesc;
}
class MachineInstr;
class Instruction;
class Value;
+class CallArgsDescriptor;
extern AnnotationID MCFI_AID;
class MachineCodeForInstruction : public Annotation {
- std::vector<Value*> tempVec; // used by m/c instr but not VM instr
- std::vector<MachineInstr*> Contents;
+ std::vector<Value*> tempVec; // used by m/c instr but not VM instr
+ std::vector<MachineInstr*> Contents; // the machine instr for this VM instr
+ CallArgsDescriptor* callArgsDesc; // only used for CALL instructions
public:
MachineCodeForInstruction() : Annotation(MCFI_AID) {}
~MachineCodeForInstruction();
tempVec.push_back(tmp);
return *this;
}
+
+ void setCallArgsDescriptor(CallArgsDescriptor* desc) { callArgsDesc = desc; }
+ CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; }
};
#endif