[llvm-commits] [llvm] r76970 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Chris Lattner sabre at nondot.org
Fri Jul 24 09:40:16 PDT 2009


Author: lattner
Date: Fri Jul 24 11:40:09 2009
New Revision: 76970

URL: http://llvm.org/viewvc/llvm-project?rev=76970&view=rev
Log:
remove a use of SectionFlagsForGlobal.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=76970&r1=76969&r2=76970&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Fri Jul 24 11:40:09 2009
@@ -382,16 +382,17 @@
 
   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;





More information about the llvm-commits mailing list