llvm.org GIT mirror llvm / dedf502
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 Dale Johannesen 11 years ago
2 changed file(s) with 5 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
197197
198198 std::string AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) {
199199 assert(MF && "No machine function?");
200 return Mang->makeNameProper(MF->getFunction()->getName() + ".eh",
201 TAI->getGlobalPrefix());
200 std::string Name = MF->getFunction()->getName();
201 if (Name.empty())
202 Name = Mang->getValueName(MF->getFunction());
203 return Mang->makeNameProper(Name + ".eh", TAI->getGlobalPrefix());
202204 }
203205
204206 void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
302302 // If the -s command line option was specified, strip the symbols out of the
303303 // resulting program to make it smaller. -s is a GLD option that we are
304304 // supporting.
305 if(!ExceptionHandling)
306 // FIXME : This causes multiple nameless _.eh symbols on
307 // darwin when EH is ON.
308 Passes.add(createStripSymbolsPass());
305 Passes.add(createStripSymbolsPass());
309306
310307 // Propagate constants at call sites into the functions they call.
311308 Passes.add(createIPConstantPropagationPass());