// Important things that make up a method!
BasicBlocksType BasicBlocks; // The basic blocks
ArgumentListType ArgumentList; // The formal arguments
- MachineCodeForMethod* machineCode; // Access to the generated native code
friend class ValueHolder<Method, Module, Module>;
void setParent(Module *parent);
inline const BasicBlock *getEntryNode() const { return front(); }
inline BasicBlock *getEntryNode() { return front(); }
- inline const MachineCodeForMethod
- &getMachineCode() const { return *machineCode;}
- inline MachineCodeForMethod
- &getMachineCode() { return *machineCode;}
-
//===--------------------------------------------------------------------===//
// BasicBlock iterator forwarding functions
//
#include "llvm/GlobalVariable.h"
#include "llvm/BasicBlock.h"
#include "llvm/iOther.h"
-#include "llvm/CodeGen/MachineInstr.h"
//===----------------------------------------------------------------------===//
// Method Implementation
Method::Method(const MethodType *Ty, const string &name)
: GlobalValue(PointerType::get(Ty), Value::MethodVal, name),
- SymTabValue(this), BasicBlocks(this), ArgumentList(this, this),
- machineCode(new MachineCodeForMethod(this)) {
+ SymTabValue(this), BasicBlocks(this), ArgumentList(this, this) {
assert(::isa<MethodType>(Ty) && "Method signature must be of method type!");
}
// Delete all of the method arguments and unlink from symbol table...
ArgumentList.delete_all();
ArgumentList.setParent(0);
-
- delete machineCode;
}
// Specialize setName to take care of symbol table majik