Clarify common linkage and the requirements on it. Enforce
[oota-llvm.git] / lib / Target / X86 / AsmPrinter / X86ATTAsmPrinter.cpp
index 2f56c2a9559dc4599ce84ba06a39aa54bc10ad5c..d5279ef4e339c346366e2f5ae44744e000016aa8 100644 (file)
@@ -782,8 +782,13 @@ void X86ATTAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
   if (Subtarget->isTargetELF())
     O << "\t.type\t" << name << ",@object\n";
 
+  
+  SectionKind GVKind = TargetLoweringObjectFile::getKindForGlobal(GVar, TM);
+  
+  
+  
   const MCSection *TheSection =
-    getObjFileLowering().SectionForGlobal(GVar, Mang, TM);
+    getObjFileLowering().SectionForGlobal(GVar, GVKind, Mang, TM);
   SwitchToSection(TheSection);
 
   // FIXME: get this stuff from section kind flags.