aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-04-02 20:10:52 +0000
committerDale Johannesen <dalej@apple.com>2008-04-02 20:10:52 +0000
commitdedf502fba8e9a009212233810ce1bcbe10619d0 (patch)
treecccb9e86970f781fc997c35cb9c7de93d1e1293e /lib/CodeGen/AsmPrinter.cpp
parentd761480fe4814ff63ed49889ad3aa5bef541d025 (diff)
Make EH work with unnamed functions. Reenable running
StripSymbols when EH is on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index c00d4d197c..65b8c436f7 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -198,8 +198,10 @@ bool AsmPrinter::doFinalization(Module &M) {
std::string AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) {
assert(MF && "No machine function?");
- return Mang->makeNameProper(MF->getFunction()->getName() + ".eh",
- TAI->getGlobalPrefix());
+ std::string Name = MF->getFunction()->getName();
+ if (Name.empty())
+ Name = Mang->getValueName(MF->getFunction());
+ return Mang->makeNameProper(Name + ".eh", TAI->getGlobalPrefix());
}
void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {