summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineModuleInfo.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-06 00:51:52 +0000
committerChris Lattner <sabre@nondot.org>2010-04-06 00:51:52 +0000
commit421ccd9892178e741e24c96cef4304262475255d (patch)
tree872241d8a22ac946efe718df378515c1964f4ac0 /include/llvm/CodeGen/MachineModuleInfo.h
parent42a4ee0a35b4672311c1b988bd883167de9f88cd (diff)
downloadllvm-421ccd9892178e741e24c96cef4304262475255d.tar.gz
llvm-421ccd9892178e741e24c96cef4304262475255d.tar.bz2
llvm-421ccd9892178e741e24c96cef4304262475255d.tar.xz
Give MachineModuleInfo an actual Module*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index d610390b63..17da43b7d6 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -100,6 +100,9 @@ class MachineModuleInfo : public ImmutablePass {
/// Context - This is the MCContext used for the entire code generator.
MCContext Context;
+ /// TheModule - This is the LLVM Module being worked on.
+ Module *TheModule;
+
/// ObjFileMMI - This is the object-file-format-specific implementation of
/// MachineModuleInfoImpl, which lets targets accumulate whatever info they
/// want.
@@ -176,6 +179,9 @@ public:
const MCContext &getContext() const { return Context; }
MCContext &getContext() { return Context; }
+ void setModule(Module *M) { TheModule = M; }
+ Module *getModule() const { return TheModule; }
+
/// getInfo - Keep track of various per-function pieces of information for
/// backends that would like to do so.
///