diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-17 21:43:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-17 21:43:43 +0000 |
commit | 10b318bcb39218d2ed525e4862c854bc8d1baf63 (patch) | |
tree | 414ec32f01b35456c581d19ab8214974df2d211c /lib/CodeGen/AsmPrinter/DwarfException.cpp | |
parent | 6edec7b34a7f16e0af7fa5947b69805238d6fe6c (diff) |
now that MCSymbol::print doesn't use it's MAI argument, we can
remove it and change all the code that prints MCSymbols to use
<< instead, which is much simpler and cleaner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfException.cpp | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp index a51ea2d7b2..ad6df15c44 100644 --- a/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -231,26 +231,17 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { // Externally visible entry into the functions eh frame info. If the // corresponding function is static, this should not be externally visible. if (!TheFunc->hasLocalLinkage()) - if (const char *GlobalEHDirective = MAI->getGlobalEHDirective()) { - O << GlobalEHDirective; - EHFrameInfo.FunctionEHSym->print(O, MAI); - O << '\n'; - } + if (const char *GlobalEHDirective = MAI->getGlobalEHDirective()) + O << GlobalEHDirective << *EHFrameInfo.FunctionEHSym << '\n'; // If corresponding function is weak definition, this should be too. - if (TheFunc->isWeakForLinker() && MAI->getWeakDefDirective()) { - O << MAI->getWeakDefDirective(); - EHFrameInfo.FunctionEHSym->print(O, MAI); - O << '\n'; - } + if (TheFunc->isWeakForLinker() && MAI->getWeakDefDirective()) + O << MAI->getWeakDefDirective() << *EHFrameInfo.FunctionEHSym << '\n'; // If corresponding function is hidden, this should be too. if (TheFunc->hasHiddenVisibility()) - if (const char *HiddenDirective = MAI->getHiddenDirective()) { - O << HiddenDirective; - EHFrameInfo.FunctionEHSym->print(O, MAI); - O << '\n'; - } + if (const char *HiddenDirective = MAI->getHiddenDirective()) + O << HiddenDirective << *EHFrameInfo.FunctionEHSym << '\n'; // If there are no calls then you can't unwind. This may mean we can omit the // EH Frame, but some environments do not handle weak absolute symbols. If @@ -260,19 +251,14 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { (!TheFunc->isWeakForLinker() || !MAI->getWeakDefDirective() || MAI->getSupportsWeakOmittedEHFrame())) { - EHFrameInfo.FunctionEHSym->print(O, MAI); - O << " = 0\n"; + O << *EHFrameInfo.FunctionEHSym << " = 0\n"; // 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->print(O, MAI); - O << "\n\n"; - } + if (const char *UsedDirective = MAI->getUsedDirective()) + O << UsedDirective << *EHFrameInfo.FunctionEHSym << "\n\n"; } else { - EHFrameInfo.FunctionEHSym->print(O, MAI); - O << ":\n"; + O << *EHFrameInfo.FunctionEHSym << ":\n"; // EH frame header. EmitDifference("eh_frame_end", EHFrameInfo.Number, @@ -344,9 +330,7 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { // link correctly. Yes, there really is. if (MMI->isUsedFunction(EHFrameInfo.function)) if (const char *UsedDirective = MAI->getUsedDirective()) { - O << UsedDirective; - EHFrameInfo.FunctionEHSym->print(O, MAI); - O << "\n\n"; + O << UsedDirective << *EHFrameInfo.FunctionEHSym << "\n\n"; } } @@ -946,7 +930,7 @@ void DwarfException::EmitExceptionTable() { PrintRelDirective(); if (GV) { - Asm->GetGlobalValueSymbol(GV)->print(O, MAI); + O << *Asm->GetGlobalValueSymbol(GV); } else { O << "0x0"; } |