aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Function.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 4267d32..3e07761 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -20,6 +20,7 @@ class BasicBlock;
class MethodArgument;
class MethodType;
class Module;
+class MachineCodeForMethod;
class Method : public GlobalValue, public SymTabValue {
public:
@@ -35,9 +36,10 @@ public:
private:
// Important things that make up a method!
- BasicBlocksType BasicBlocks; // The basic blocks
- ArgumentListType ArgumentList; // The formal arguments
-
+ 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);
@@ -67,6 +69,11 @@ public:
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
//