aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
commite73bcbb57b0bebe06a2e97c538b61ce2a432f07c (patch)
treecccb9e86970f781fc997c35cb9c7de93d1e1293e /lib
parenta2245affc1c04d3948f99ded7ae022d0e35779ff (diff)
downloadexternal_llvm-e73bcbb57b0bebe06a2e97c538b61ce2a432f07c.zip
external_llvm-e73bcbb57b0bebe06a2e97c538b61ce2a432f07c.tar.gz
external_llvm-e73bcbb57b0bebe06a2e97c538b61ce2a432f07c.tar.bz2
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')
-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 c00d4d1..65b8c43 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) {