The exception handling function info should be reset for each new
authorBill Wendling <isanbard@gmail.com>
Tue, 18 Sep 2007 05:03:44 +0000 (05:03 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 18 Sep 2007 05:03:44 +0000 (05:03 +0000)
function. The information isn't used heavily -- it's only used at the end
of exception handling emission -- so there's no need to cache it.

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

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

index 08a4b6011ebf1a980602a3d09732ea58317381d1..31fb0f43e2c36be08e4693ba616d4f60c427b5c9 100644 (file)
@@ -43,11 +43,6 @@ namespace llvm {
     ///
     unsigned FunctionNumber;
 
-    /// Cache of mangled exception handling name for current function. This is
-    /// recalculated at the beginning of each call to runOnMachineFunction().
-    ///
-    std::string CurrentFnEHName;
-
   protected:
     // Necessary for external weak linkage support
     std::set<const GlobalValue*> ExtWeakSymbols;
index e0a5928da8f25ab11e9ac31f22b026aa2308bc9d..7b579c4ea303af7b39f29588e12d74699665ad53 100644 (file)
@@ -163,10 +163,8 @@ bool AsmPrinter::doFinalization(Module &M) {
 const std::string &
 AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) {
   assert(MF && "No machine function?");
-  if (CurrentFnEHName != "") return CurrentFnEHName;
-  return CurrentFnEHName =
-    Mang->makeNameProper(MF->getFunction()->getName() + ".eh",
-                         TAI->getGlobalPrefix());
+  return Mang->makeNameProper(MF->getFunction()->getName() + ".eh",
+                              TAI->getGlobalPrefix());
 }
 
 void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {