diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-06-24 18:17:00 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-06-24 18:17:00 +0000 |
| commit | cc5104dcc4475b2532c09c8050f1097a6565f2ad (patch) | |
| tree | 5175e61399c2c9baca443e08c79e8a35a96f8de6 | |
| parent | 63aab8a84c93fe6684d84271821a9691b5c9fca5 (diff) | |
| download | bcm5719-llvm-cc5104dcc4475b2532c09c8050f1097a6565f2ad.tar.gz bcm5719-llvm-cc5104dcc4475b2532c09c8050f1097a6565f2ad.zip | |
simplify personality function stub printing to use the mangler and
decorateName like other stuff instead of special casing _. Also, stick
it into GVStubs and let the normal stub printer print the stub instead
of doing it manually.
llvm-svn: 74090
| -rw-r--r-- | llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 4ce8dcd9df3..30993d48c69 100644 --- a/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -1134,9 +1134,8 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) { i != e; ++i) O << "\t.ascii \" -export:" << i->getKeyData() << ",data\"\n"; - if (!DLLExportedFns.empty()) { + if (!DLLExportedFns.empty()) SwitchToDataSection(".section .drectve"); - } for (StringSet<>::iterator i = DLLExportedFns.begin(), e = DLLExportedFns.end(); @@ -1162,20 +1161,21 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) { // Print global value stubs. bool InStubSection = false; + // Add the (possibly multiple) personalities to the set of global value + // stubs. Only referenced functions get into the Personalities list. if (TAI->doesSupportExceptionHandling() && MMI && !Subtarget->is64Bit()) { - // Add the (possibly multiple) personalities to the set of global values. - // Only referenced functions get into the Personalities list. - const std::vector<Function *>& Personalities = MMI->getPersonalities(); - for (std::vector<Function *>::const_iterator I = Personalities.begin(), - E = Personalities.end(); I != E; ++I) { - if (!*I) + const std::vector<Function*> &Personalities = MMI->getPersonalities(); + for (unsigned i = 0, e = Personalities.size(); i != e; ++i) { + if (Personalities[i] == 0) continue; if (!InStubSection) { SwitchToDataSection( "\t.section __IMPORT,__pointers,non_lazy_symbol_pointers"); InStubSection = true; } - printGVStub((*I)->getNameStart(), "_"); + std::string Name = Mang->getValueName(Personalities[i]); + decorateName(Name, Personalities[i]); + GVStubs.insert(Name); } } |

