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:
parent
839bcb4af2
commit
b313efb0cd
|
@ -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.
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
|
||||
%a = extern_weak global int
|
||||
%b = global int* %a
|
Loading…
Reference in New Issue