[llvm-commits] [llvm] r81946 - in /llvm/trunk: include/llvm/MC/MCAsmInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/MC/MCAsmInfo.cpp

Chris Lattner sabre at nondot.org
Tue Sep 15 16:11:32 PDT 2009


Author: lattner
Date: Tue Sep 15 18:11:32 2009
New Revision: 81946

URL: http://llvm.org/viewvc/llvm-project?rev=81946&view=rev
Log:
remove some horrible MAI hooks which fortunately turn out to be always empty.

Modified:
    llvm/trunk/include/llvm/MC/MCAsmInfo.h
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    llvm/trunk/lib/MC/MCAsmInfo.cpp

Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=81946&r1=81945&r2=81946&view=diff

==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Tue Sep 15 18:11:32 2009
@@ -84,18 +84,6 @@
     /// is "l" on Darwin, currently used for some ObjC metadata.
     const char *LinkerPrivateGlobalPrefix;   // Defaults to ""
     
-    /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
-    /// will enclose any GlobalVariable (that isn't a function)
-    ///
-    const char *GlobalVarAddrPrefix;         // Defaults to ""
-    const char *GlobalVarAddrSuffix;         // Defaults to ""
-
-    /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
-    /// will enclose any GlobalVariable that points to a function.
-    ///
-    const char *FunctionAddrPrefix;          // Defaults to ""
-    const char *FunctionAddrSuffix;          // Defaults to ""
-
     /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
     /// enclose any personality function in the common frame section.
     /// 
@@ -365,18 +353,6 @@
     const char *getLinkerPrivateGlobalPrefix() const {
       return LinkerPrivateGlobalPrefix;
     }
-    const char *getGlobalVarAddrPrefix() const {
-      return GlobalVarAddrPrefix;
-    }
-    const char *getGlobalVarAddrSuffix() const {
-      return GlobalVarAddrSuffix;
-    }
-    const char *getFunctionAddrPrefix() const {
-      return FunctionAddrPrefix;
-    }
-    const char *getFunctionAddrSuffix() const {
-      return FunctionAddrSuffix;
-    }
     const char *getPersonalityPrefix() const {
       return PersonalityPrefix;
     }

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=81946&r1=81945&r2=81946&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Sep 15 18:11:32 2009
@@ -514,16 +514,7 @@
 /// generate the appropriate value.
 const std::string &AsmPrinter::getGlobalLinkName(const GlobalVariable *GV,
                                                  std::string &LinkName) const {
-  if (isa<Function>(GV)) {
-    LinkName += MAI->getFunctionAddrPrefix();
-    LinkName += Mang->getMangledName(GV);
-    LinkName += MAI->getFunctionAddrSuffix();
-  } else {
-    LinkName += MAI->getGlobalVarAddrPrefix();
-    LinkName += Mang->getMangledName(GV);
-    LinkName += MAI->getGlobalVarAddrSuffix();
-  }  
-  
+  LinkName += Mang->getMangledName(GV);
   return LinkName;
 }
 
@@ -838,18 +829,8 @@
     O << CI->getZExtValue();
   } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
     // This is a constant address for a global variable or function. Use the
-    // name of the variable or function as the address value, possibly
-    // decorating it with GlobalVarAddrPrefix/Suffix or
-    // FunctionAddrPrefix/Suffix (these all default to "" )
-    if (isa<Function>(GV)) {
-      O << MAI->getFunctionAddrPrefix()
-        << Mang->getMangledName(GV)
-        << MAI->getFunctionAddrSuffix();
-    } else {
-      O << MAI->getGlobalVarAddrPrefix()
-        << Mang->getMangledName(GV)
-        << MAI->getGlobalVarAddrSuffix();
-    }
+    // name of the variable or function as the address value.
+    O << Mang->getMangledName(GV);
   } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
     const TargetData *TD = TM.getTargetData();
     unsigned Opcode = CE->getOpcode();    

Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=81946&r1=81945&r2=81946&view=diff

==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfo.cpp Tue Sep 15 18:11:32 2009
@@ -30,10 +30,6 @@
   GlobalPrefix = "";
   PrivateGlobalPrefix = ".";
   LinkerPrivateGlobalPrefix = "";
-  GlobalVarAddrPrefix = "";
-  GlobalVarAddrSuffix = "";
-  FunctionAddrPrefix = "";
-  FunctionAddrSuffix = "";
   PersonalityPrefix = "";
   PersonalitySuffix = "";
   NeedsIndirectEncoding = false;





More information about the llvm-commits mailing list