diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-10 07:20:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-10 07:20:42 +0000 |
commit | 60313f81e737297349305e503b5353c11f89679c (patch) | |
tree | 1b132acb0ac6dd2afab411e0ecb8eae337e3a3ef /lib/CodeGen/AsmPrinter/DwarfException.cpp | |
parent | 625a43ed135dab9b93eaf172d4400aa737e799c6 (diff) | |
download | external_llvm-60313f81e737297349305e503b5353c11f89679c.zip external_llvm-60313f81e737297349305e503b5353c11f89679c.tar.gz external_llvm-60313f81e737297349305e503b5353c11f89679c.tar.bz2 |
move three lowering hooks from MAI to TLOF and make one of them
semantic instead of syntactic. This completes MCization of
darwin/x86[-64]!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98145 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, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp index 099c112..11a01fe 100644 --- a/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -85,7 +85,7 @@ void DwarfException::EmitCIE(const Function *PersonalityFn, unsigned Index) { Asm->OutStreamer.SwitchSection(TLOF.getEHFrameSection()); MCSymbol *EHFrameSym; - if (MAI->is_EHSymbolPrivate()) + if (TLOF.isFunctionEHFrameSymbolPrivate()) EHFrameSym = getDWLabel("EH_frame", Index); else EHFrameSym = Asm->OutContext.GetOrCreateSymbol(Twine("EH_frame") + @@ -193,9 +193,8 @@ 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 << '\n'; + if (!TheFunc->hasLocalLinkage() && TLOF.isFunctionEHSymbolGlobal()) + Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,MCSA_Global); // If corresponding function is weak definition, this should be too. if (TheFunc->isWeakForLinker() && MAI->getWeakDefDirective()) @@ -215,7 +214,7 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { if (!EHFrameInfo.hasCalls && !UnwindTablesMandatory && (!TheFunc->isWeakForLinker() || !MAI->getWeakDefDirective() || - MAI->getSupportsWeakOmittedEHFrame())) { + TLOF.getSupportsWeakOmittedEHFrame())) { Asm->OutStreamer.EmitAssignment(EHFrameInfo.FunctionEHSym, MCConstantExpr::Create(0, Asm->OutContext)); // This name has no connection to the function, so it might get @@ -981,9 +980,10 @@ void DwarfException::EndFunction() { Asm->OutStreamer.EmitLabel(getDWLabel("eh_func_end", SubprogramCount)); EmitExceptionTable(); + const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering(); MCSymbol *FunctionEHSym = Asm->GetSymbolWithGlobalValueBase(MF->getFunction(), ".eh", - Asm->MAI->is_EHSymbolPrivate()); + TLOF.isFunctionEHFrameSymbolPrivate()); // Save EH frame information EHFrames.push_back(FunctionEHFrameInfo(FunctionEHSym, SubprogramCount, |