remove some horrible MAI hooks which fortunately turn out to be always empty.
authorChris Lattner <sabre@nondot.org>
Tue, 15 Sep 2009 23:11:32 +0000 (23:11 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 15 Sep 2009 23:11:32 +0000 (23:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81946 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCAsmInfo.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/MC/MCAsmInfo.cpp

index efc2f1b14883a6adc7f0b1e5b471e33b27b23854..7f2ce4223ab6978080a40efd0fd53c1fd22c1d8a 100644 (file)
@@ -84,18 +84,6 @@ namespace llvm {
     /// 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 @@ namespace llvm {
     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;
     }
index 265a837822ff6822327a0e81ce987e329400ca43..745696cc87907d604c94c9d3ff913071d0fe95a4 100644 (file)
@@ -514,16 +514,7 @@ void AsmPrinter::EmitXXStructorList(Constant *List) {
 /// 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 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
     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();    
index 1630482de42a866c93fcbb408c9b63708494d215..fddacdbe8429deb0c014715941774fa8ea711e9c 100644 (file)
@@ -30,10 +30,6 @@ MCAsmInfo::MCAsmInfo() {
   GlobalPrefix = "";
   PrivateGlobalPrefix = ".";
   LinkerPrivateGlobalPrefix = "";
-  GlobalVarAddrPrefix = "";
-  GlobalVarAddrSuffix = "";
-  FunctionAddrPrefix = "";
-  FunctionAddrSuffix = "";
   PersonalityPrefix = "";
   PersonalitySuffix = "";
   NeedsIndirectEncoding = false;