From e1e533437aa4b53d7a70bacd4fa0fdfe0803c78e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 16 Sep 2009 05:25:43 +0000 Subject: [PATCH] tidy up git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82011 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.34.1