diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-23 05:51:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-23 05:51:36 +0000 |
commit | 3a9be0ee36fe2143f514d28315f3dc1bda132b2e (patch) | |
tree | 1eba2579597f6e068b243e3c3593a004c2f788b3 /lib/CodeGen/AsmPrinter/DwarfException.cpp | |
parent | 63df4a4fec6aeff0a62d80d781019ac34d2fd98c (diff) |
mcstreamerize .no_dead_strip and .reference for static ctors/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfException.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp index 9a1c41c2a6..1b72f73fb1 100644 --- a/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -245,8 +245,9 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { // This name has no connection to the function, so it might get // dead-stripped when the function is not, erroneously. Prohibit // dead-stripping unconditionally. - if (const char *UsedDirective = MAI->getUsedDirective()) - O << UsedDirective << *EHFrameInfo.FunctionEHSym << "\n\n"; + if (MAI->hasNoDeadStrip()) + Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym, + MCStreamer::NoDeadStrip); } else { O << *EHFrameInfo.FunctionEHSym << ":\n"; @@ -313,8 +314,9 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { // on unused functions (calling undefined externals) being dead-stripped to // link correctly. Yes, there really is. if (MMI->isUsedFunction(EHFrameInfo.function)) - if (const char *UsedDirective = MAI->getUsedDirective()) - O << UsedDirective << *EHFrameInfo.FunctionEHSym << "\n\n"; + if (MAI->hasNoDeadStrip()) + Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym, + MCStreamer::NoDeadStrip); } Asm->O << '\n'; } @@ -982,7 +984,7 @@ void DwarfException::EndFunction() { EmitLabel("eh_func_end", SubprogramCount); EmitExceptionTable(); - const MCSymbol *FunctionEHSym = + MCSymbol *FunctionEHSym = Asm->GetSymbolWithGlobalValueBase(MF->getFunction(), ".eh", Asm->MAI->is_EHSymbolPrivate()); |