Eliminate AsmPrinter::EmitExternalGlobal, inlining its (now)
authorChris Lattner <sabre@nondot.org>
Wed, 16 Sep 2009 00:17:39 +0000 (00:17 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 16 Sep 2009 00:17:39 +0000 (00:17 +0000)
one implementation into its one caller.  This eliminates a totally
awesome and gratuitous hack where we casted a Function* to
GlobalVariable*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81967 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/DwarfException.cpp

index 8404841b5a3f70ebadced0ec98b6b78f536f0249..375b260c135e73b69d7f2120b1a42074944e18cf 100644 (file)
@@ -159,10 +159,6 @@ namespace llvm {
     ///
     bool isVerbose() const { return VerboseAsm; }
 
-    /// EmitExternalGlobal - Emit the external reference to a global variable.
-    /// Should be overridden if an indirect reference should be used.
-    virtual void EmitExternalGlobal(const GlobalVariable *GV);
-
     /// getCurrentFunctionEHName - Called to return the CurrentFnEHName.
     /// 
     std::string getCurrentFunctionEHName(const MachineFunction *MF) const;
index a457421b90711b01732a86452e54eb637482ebc9..e5f0dba2b97e534895c8c941d1d16ac474a0db99 100644 (file)
@@ -509,13 +509,6 @@ void AsmPrinter::EmitXXStructorList(Constant *List) {
     }
 }
 
-/// EmitExternalGlobal - Emit the external reference to a global variable.
-/// Should be overridden if an indirect reference should be used.
-void AsmPrinter::EmitExternalGlobal(const GlobalVariable *GV) {
-  O << Mang->getMangledName(GV);
-}
-
-
 
 //===----------------------------------------------------------------------===//
 /// LEB 128 number encoding.
index abd2e6fe80d30bb80fda99a3ea772f5cd689d0f7..f8e8009cd0c9727f32881dcdc4f7dc9822bb7489 100644 (file)
@@ -163,7 +163,7 @@ void DwarfException::EmitCIE(const Function *Personality, unsigned Index) {
     O << MAI->getData32bitsDirective();
     
     O << MAI->getPersonalityPrefix();
-    Asm->EmitExternalGlobal((const GlobalVariable *)(Personality));
+    O << Asm->Mang->getMangledName(Personality);
     O << MAI->getPersonalitySuffix();
     
     if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL"))