From: Chris Lattner Date: Wed, 16 Sep 2009 00:35:39 +0000 (+0000) Subject: inline AsmPrinter::getCurrentFunctionEHName into its only caller. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=25d812bd7d1f58f2ba1b598b1425a2e146e27381;p=oota-llvm.git inline AsmPrinter::getCurrentFunctionEHName into its only caller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81970 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index d3880651017..860aff55096 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -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; } diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index e5f0dba2b97..ef43c352acd 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -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(); - } } namespace { diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp index f8e8009cd0c..06f9590dd6c 100644 --- a/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -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(),