From: Chris Lattner Date: Wed, 16 Sep 2009 05:25:43 +0000 (+0000) Subject: tidy up X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e1e533437aa4b53d7a70bacd4fa0fdfe0803c78e;p=oota-llvm.git tidy up git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82011 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 4085f984418..160d298be33 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -732,11 +732,9 @@ void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) { } void X86ATTAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { - const TargetData *TD = TM.getTargetData(); - if (!GVar->hasInitializer()) return; // External global require no code - + // Check to see if this is a special global used by LLVM, if so, emit it. if (EmitSpecialLLVMGlobal(GVar)) { if (Subtarget->isTargetDarwin() && @@ -748,6 +746,8 @@ void X86ATTAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { } return; } + + const TargetData *TD = TM.getTargetData(); std::string name = Mang->getMangledName(GVar); Constant *C = GVar->getInitializer();