From dc62ea0f1c6eb0673f39c543f1936ce125efdb30 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 16 Sep 2009 06:25:03 +0000 Subject: 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 --- include/llvm/CodeGen/MachineModuleInfo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/llvm/CodeGen/MachineModuleInfo.h') 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 - Ty *getObjFileInfo() { + Ty &getObjFileInfo() { if (ObjFileMMI == 0) ObjFileMMI = new Ty(*this); assert((void*)dynamic_cast(ObjFileMMI) == (void*)ObjFileMMI && "Invalid concrete type or multiple inheritence for getInfo"); - return static_cast(ObjFileMMI); + return *static_cast(ObjFileMMI); } template - const Ty *getObjFileInfo() const { + const Ty &getObjFileInfo() const { return const_cast(this)->getObjFileInfo(); } -- cgit v1.2.3-18-g5258