diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-24 16:40:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-24 16:40:09 +0000 |
commit | 8aafa1c4b64aa863823dbfc372aa7464257cabe6 (patch) | |
tree | f51bb19ad60e699671e6c75a8630c599c9f8e623 /lib/CodeGen/AsmPrinter | |
parent | 4b037aae5c8a4fd892589c39e3af13727af9cbff (diff) | |
download | external_llvm-8aafa1c4b64aa863823dbfc372aa7464257cabe6.zip external_llvm-8aafa1c4b64aa863823dbfc372aa7464257cabe6.tar.gz external_llvm-8aafa1c4b64aa863823dbfc372aa7464257cabe6.tar.bz2 |
remove a use of SectionFlagsForGlobal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76970 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 44d1636..887c417 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -382,16 +382,17 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, const char* JumpTableDataSection = TAI->getJumpTableDataSection(); const Function *F = MF.getFunction(); - unsigned SectionFlags = TAI->SectionFlagsForGlobal(F); + const Section *FuncSection = TAI->SectionForGlobal(F); + bool JTInDiffSection = false; if ((IsPic && !(LoweringInfo && LoweringInfo->usesGlobalOffsetTable())) || !JumpTableDataSection || - SectionFlags & SectionFlags::Linkonce) { + FuncSection->hasFlag(SectionFlags::Linkonce)) { // In PIC mode, we need to emit the jump table to the same section as the // function body itself, otherwise the label differences won't make sense. // We should also do if the section name is NULL or function is declared in // discardable section. - SwitchToSection(TAI->SectionForGlobal(F)); + SwitchToSection(FuncSection); } else { SwitchToDataSection(JumpTableDataSection); JTInDiffSection = true; |