[llvm-commits] [llvm] r82012 - in /llvm/trunk: include/llvm/CodeGen/MachineModuleInfo.h lib/CodeGen/MachineModuleInfo.cpp

Chris Lattner sabre at nondot.org
Tue Sep 15 22:26:00 PDT 2009


Author: lattner
Date: Wed Sep 16 00:26:00 2009
New Revision: 82012

URL: http://llvm.org/viewvc/llvm-project?rev=82012&view=rev
Log:
the pointer MMI keeps will start out with object-file format specific stuff

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h
    llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp

Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=82012&r1=82011&r2=82012&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Wed Sep 16 00:26:00 2009
@@ -91,9 +91,10 @@
 /// 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 @@
   /// backends that would like to do so.
   ///
   template<typename Ty>
-  Ty *getInfo() {
-    if (TargetMMI == 0)
-      TargetMMI = new Ty(*this);
+  Ty *getObjFileInfo() {
+    if (ObjFileMMI == 0)
+      ObjFileMMI = new Ty(*this);
     
-    assert((void*)dynamic_cast<Ty*>(TargetMMI) == (void*)TargetMMI &&
+    assert((void*)dynamic_cast<Ty*>(ObjFileMMI) == (void*)ObjFileMMI &&
            "Invalid concrete type or multiple inheritence for getInfo");
-    return static_cast<Ty*>(TargetMMI);
+    return static_cast<Ty*>(ObjFileMMI);
   }
   
   template<typename Ty>
-  const Ty *getInfo() const {
-    return const_cast<MachineModuleInfo*>(this)->getInfo<Ty>();
+  const Ty *getObjFileInfo() const {
+    return const_cast<MachineModuleInfo*>(this)->getObjFileInfo<Ty>();
   }
   
   /// AnalyzeModule - Scan the module for global debug information.

Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=82012&r1=82011&r2=82012&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Wed Sep 16 00:26:00 2009
@@ -39,7 +39,7 @@
 
 MachineModuleInfo::MachineModuleInfo()
 : ImmutablePass(&ID)
-, TargetMMI(0)
+, ObjFileMMI(0)
 , CallsEHReturn(0)
 , CallsUnwindInit(0)
 , DbgInfoAvailable(false) {
@@ -48,7 +48,7 @@
 }
 
 MachineModuleInfo::~MachineModuleInfo() {
-  delete TargetMMI;
+  delete ObjFileMMI;
 }
 
 /// doInitialization - Initialize the state for a new module.





More information about the llvm-commits mailing list