fix test/Regression/CodeGen/X86/weak.ll

if a variable has no initialization, I->getInitializer() will fail

llvm-svn: 32407
This commit is contained in:
Rafael Espindola 2006-12-09 23:14:08 +00:00
parent 839bcb4af2
commit b313efb0cd
2 changed files with 4 additions and 1 deletions

View File

@ -132,7 +132,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
// Print out module-level global variables here.
for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
I != E; ++I) {
if (!I->hasInitializer() && !I->hasExternalWeakLinkage())
if (!I->hasInitializer())
continue; // External global require no code
// Check to see if this is a special global used by LLVM, if so, emit it.

View File

@ -0,0 +1,3 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
%a = extern_weak global int
%b = global int* %a