summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit491557712ac32719b197d63e4dba72437df3b61c (patch)
tree2d3b28f3031d85f20dfbef5930df6805d1f2d0df /llvm/lib/CodeGen/AsmPrinter.cpp
parent39d8b263227eca93f3399a101545eb2e2a078291 (diff)
downloadbcm5719-llvm-491557712ac32719b197d63e4dba72437df3b61c.tar.gz
bcm5719-llvm-491557712ac32719b197d63e4dba72437df3b61c.zip
Make EH work with unnamed functions. Reenable running
StripSymbols when EH is on. llvm-svn: 49110
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index c00d4d197c8..65b8c436f78 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud