Eliminate AsmPrinter::EmitExternalGlobal, inlining its (now)
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
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index a457421..e5f0dba 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -509,13 +509,6 @@
}
}
-/// 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.
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index abd2e6f..f8e8009 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -163,7 +163,7 @@
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"))