mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-30 05:29:47 +00:00
Ensure that EmitGlobalVariable is correctly differentiating between declarations
and definitions when emitting global variables. This was causing global declarations to be emitted as if they were definitions. Fixes <rdar://problem/9429892>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132825 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
88b2af7e61
commit
348d542199
@ -269,7 +269,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
|
||||
}
|
||||
|
||||
MCSymbol *GVSym = Mang->getSymbol(GV);
|
||||
EmitVisibility(GVSym, GV->getVisibility());
|
||||
EmitVisibility(GVSym, GV->getVisibility(), !GV->isDeclaration());
|
||||
|
||||
if (!GV->hasInitializer()) // External globals require no extra code.
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user