mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 17:33:29 +00:00
fix test/Regression/CodeGen/X86/weak.ll
if a variable has no initialization, I->getInitializer() will fail git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32407 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b24426375
commit
3e69a7e527
@ -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.
|
||||
|
3
test/CodeGen/X86/weak.ll
Normal file
3
test/CodeGen/X86/weak.ll
Normal file
@ -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
Block a user