From: Chris Lattner Date: Wed, 16 Sep 2009 05:26:00 +0000 (+0000) Subject: the pointer MMI keeps will start out with object-file format specific stuff X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f18545550e1cfbe3f47afb6a9a58405416258e3b;p=oota-llvm.git the pointer MMI keeps will start out with object-file format specific stuff git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82012 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 88aba7ee5e4..1ea01b43676 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -91,9 +91,10 @@ struct LandingPadInfo { /// schemes and reformated for specific use. /// class MachineModuleInfo : public ImmutablePass { - /// TargetMMI - This is the target-specific implementation of - /// MachineModuleInfoImpl, which lets them accumulate whatever info they want. - MachineModuleInfoImpl *TargetMMI; + /// ObjFileMMI - This is the object-file-format-specific implementation of + /// MachineModuleInfoImpl, which lets targets accumulate whatever info they + /// want. + MachineModuleInfoImpl *ObjFileMMI; // LabelIDList - One entry per assigned label. Normally the entry is equal to // the list index(+1). If the entry is zero then the label has been deleted. @@ -161,18 +162,18 @@ public: /// backends that would like to do so. /// template - Ty *getInfo() { - if (TargetMMI == 0) - TargetMMI = new Ty(*this); + Ty *getObjFileInfo() { + if (ObjFileMMI == 0) + ObjFileMMI = new Ty(*this); - assert((void*)dynamic_cast(TargetMMI) == (void*)TargetMMI && + assert((void*)dynamic_cast(ObjFileMMI) == (void*)ObjFileMMI && "Invalid concrete type or multiple inheritence for getInfo"); - return static_cast(TargetMMI); + return static_cast(ObjFileMMI); } template - const Ty *getInfo() const { - return const_cast(this)->getInfo(); + const Ty *getObjFileInfo() const { + return const_cast(this)->getObjFileInfo(); } /// AnalyzeModule - Scan the module for global debug information. diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index b32ed81d1cb..0a8bf5a3d89 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -39,7 +39,7 @@ MachineModuleInfoImpl::~MachineModuleInfoImpl() {} MachineModuleInfo::MachineModuleInfo() : ImmutablePass(&ID) -, TargetMMI(0) +, ObjFileMMI(0) , CallsEHReturn(0) , CallsUnwindInit(0) , DbgInfoAvailable(false) { @@ -48,7 +48,7 @@ MachineModuleInfo::MachineModuleInfo() } MachineModuleInfo::~MachineModuleInfo() { - delete TargetMMI; + delete ObjFileMMI; } /// doInitialization - Initialize the state for a new module.