[llvm-commits] [llvm] r81970 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/DwarfException.cpp

Chris Lattner sabre at nondot.org
Tue Sep 15 17:35:39 PDT 2009


Author: lattner
Date: Tue Sep 15 19:35:39 2009
New Revision: 81970

URL: http://llvm.org/viewvc/llvm-project?rev=81970&view=rev
Log:
inline AsmPrinter::getCurrentFunctionEHName into its only caller.

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

Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=81970&r1=81969&r2=81970&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Tue Sep 15 19:35:39 2009
@@ -154,10 +154,6 @@
     ///
     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; }

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

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Sep 15 19:35:39 2009
@@ -212,21 +212,13 @@
   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 {

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

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Tue Sep 15 19:35:39 2009
@@ -960,9 +960,12 @@
   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(),





More information about the llvm-commits mailing list