The exception handling function info should be reset for each new

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
This commit is contained in:
Bill Wendling 2007-09-18 05:03:44 +00:00
parent 8b94a14a78
commit 5f19cf5df8
2 changed files with 2 additions and 9 deletions

View 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;

View 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) {