inline AsmPrinter::getCurrentFunctionEHName into its only caller.
authorChris Lattner <sabre@nondot.org>
Wed, 16 Sep 2009 00:35:39 +0000 (00:35 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 16 Sep 2009 00:35:39 +0000 (00:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81970 91177308-0d34-0410-b5e6-96231b3b80d8

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

index d38806510172003f8df6ba1cc22e5dd579b69b42..860aff550966147d52f83eed919135fa4d5f6943 100644 (file)
@@ -154,10 +154,6 @@ namespace llvm {
     ///
     bool isVerbose() const { return VerboseAsm; }
 
-    /// getCurrentFunctionEHName - Called to return the CurrentFnEHName.
-    /// 
-    std::string getCurrentFunctionEHName(const MachineFunction *MF) const;
-
     /// getFunctionNumber - Return a unique ID for the current function.
     ///
     unsigned getFunctionNumber() const { return FunctionNumber; }
index e5f0dba2b97e534895c8c941d1d16ac474a0db99..ef43c352acd08f5a404b5c03f8cdc2c8fdc4ebee 100644 (file)
@@ -212,21 +212,13 @@ bool AsmPrinter::doFinalization(Module &M) {
   return false;
 }
 
-std::string 
-AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) const {
-  assert(MF && "No machine function?");
-  return Mang->getMangledName(MF->getFunction(), ".eh",
-                              MAI->is_EHSymbolPrivate());
-}
-
 void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
   // What's my mangled name?
   CurrentFnName = Mang->getMangledName(MF.getFunction());
   IncrementFunctionNumber();
 
-  if (VerboseAsm) {
+  if (VerboseAsm)
     LI = &getAnalysis<MachineLoopInfo>();
-  }
 }
 
 namespace {
index f8e8009cd0c9727f32881dcdc4f7dc9822bb7489..06f9590dd6c5ccdd8c524785d90cecb0ad6138cc 100644 (file)
@@ -960,9 +960,12 @@ void DwarfException::EndFunction() {
   EmitLabel("eh_func_end", SubprogramCount);
   EmitExceptionTable();
 
+  std::string FunctionEHName =
+    Asm->Mang->getMangledName(MF->getFunction(), ".eh",
+                              Asm->MAI->is_EHSymbolPrivate());
+  
   // Save EH frame information
-  EHFrames.push_back(FunctionEHFrameInfo(getAsm()->getCurrentFunctionEHName(MF),
-                                         SubprogramCount,
+  EHFrames.push_back(FunctionEHFrameInfo(FunctionEHName, SubprogramCount,
                                          MMI->getPersonalityIndex(),
                                          MF->getFrameInfo()->hasCalls(),
                                          !MMI->getLandingPads().empty(),