From d0418ce890ed94a233f69423afb0499a884ff4a9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 24 Jul 2009 16:40:09 +0000 Subject: [PATCH] remove a use of SectionFlagsForGlobal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76970 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 44d163617e9..887c417a8a1 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;