diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-16 06:25:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-16 06:25:03 +0000 |
commit | 4117b16b1ef23390d1f1bde4a3f0a1d29250f667 (patch) | |
tree | 10aa59bbe54df14c669b87fc44ce589e08932a48 /include/llvm/CodeGen/MachineModuleInfo.h | |
parent | c3e800a55a04aae2d825fbcf5aed2102a68eaec5 (diff) | |
download | external_llvm-4117b16b1ef23390d1f1bde4a3f0a1d29250f667.tar.gz external_llvm-4117b16b1ef23390d1f1bde4a3f0a1d29250f667.tar.bz2 external_llvm-4117b16b1ef23390d1f1bde4a3f0a1d29250f667.zip |
move FnStubs/GVSTubs/HiddenGVStub handling out of the X86 asmprinter
and use MachineModuleInfoMachO instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineModuleInfo.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 2d23495b48..e5a962d26b 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -163,17 +163,17 @@ public: /// backends that would like to do so. /// template<typename Ty> - Ty *getObjFileInfo() { + Ty &getObjFileInfo() { if (ObjFileMMI == 0) ObjFileMMI = new Ty(*this); assert((void*)dynamic_cast<Ty*>(ObjFileMMI) == (void*)ObjFileMMI && "Invalid concrete type or multiple inheritence for getInfo"); - return static_cast<Ty*>(ObjFileMMI); + return *static_cast<Ty*>(ObjFileMMI); } template<typename Ty> - const Ty *getObjFileInfo() const { + const Ty &getObjFileInfo() const { return const_cast<MachineModuleInfo*>(this)->getObjFileInfo<Ty>(); } |