mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
d57120551f
Before this patch we had @a = weak global ... but @b = alias weak ... The patch changes aliases to look more like global variables. Looking at some really old code suggests that the reason was that the old bison based parser had a reduction for alias linkages and another one for global variable linkages. Putting the alias first avoided the reduce/reduce conflict. The days of the old .ll parser are long gone. The new one parses just "linkage" and a later check is responsible for deciding if a linkage is valid in a given context. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214355 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
340 B
LLVM
18 lines
340 B
LLVM
; RUN: opt < %s -internalize -internalize-public-api-list main -S | FileCheck %s
|
|
|
|
@A = global i32 0
|
|
; CHECK: @A = internal global i32 0
|
|
|
|
@B = alias i32* @A
|
|
; CHECK: @B = internal alias i32* @A
|
|
|
|
@C = alias i32* @A
|
|
; CHECK: @C = internal alias i32* @A
|
|
|
|
define i32 @main() {
|
|
%tmp = load i32* @C
|
|
ret i32 %tmp
|
|
}
|
|
|
|
; CHECK: define i32 @main() {
|