mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 12:40:17 +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
81 lines
2.4 KiB
LLVM
81 lines
2.4 KiB
LLVM
; RUN: llvm-dis < %s.bc | FileCheck %s
|
|
; RUN: verify-uselistorder < %s.bc -preserve-bc-use-list-order -num-shuffles=5
|
|
|
|
; local-linkage-default-visibility.3.4.ll.bc was generated by passing this file
|
|
; to llvm-as-3.4. The test checks that LLVM upgrades visibility of symbols
|
|
; with local linkage to default visibility.
|
|
|
|
@default.internal.var = internal global i32 0
|
|
; CHECK: @default.internal.var = internal global i32 0
|
|
|
|
@hidden.internal.var = internal hidden global i32 0
|
|
; CHECK: @hidden.internal.var = internal global i32 0
|
|
|
|
@protected.internal.var = internal protected global i32 0
|
|
; CHECK: @protected.internal.var = internal global i32 0
|
|
|
|
@default.private.var = private global i32 0
|
|
; CHECK: @default.private.var = private global i32 0
|
|
|
|
@hidden.private.var = private hidden global i32 0
|
|
; CHECK: @hidden.private.var = private global i32 0
|
|
|
|
@protected.private.var = private protected global i32 0
|
|
; CHECK: @protected.private.var = private global i32 0
|
|
|
|
@global = global i32 0
|
|
|
|
@default.internal.alias = alias internal i32* @global
|
|
; CHECK: @default.internal.alias = internal alias i32* @global
|
|
|
|
@hidden.internal.alias = hidden alias internal i32* @global
|
|
; CHECK: @hidden.internal.alias = internal alias i32* @global
|
|
|
|
@protected.internal.alias = protected alias internal i32* @global
|
|
; CHECK: @protected.internal.alias = internal alias i32* @global
|
|
|
|
@default.private.alias = alias private i32* @global
|
|
; CHECK: @default.private.alias = private alias i32* @global
|
|
|
|
@hidden.private.alias = hidden alias private i32* @global
|
|
; CHECK: @hidden.private.alias = private alias i32* @global
|
|
|
|
@protected.private.alias = protected alias private i32* @global
|
|
; CHECK: @protected.private.alias = private alias i32* @global
|
|
|
|
define internal void @default.internal() {
|
|
; CHECK: define internal void @default.internal
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
define internal hidden void @hidden.internal() {
|
|
; CHECK: define internal void @hidden.internal
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
define internal protected void @protected.internal() {
|
|
; CHECK: define internal void @protected.internal
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
define private void @default.private() {
|
|
; CHECK: define private void @default.private
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
define private hidden void @hidden.private() {
|
|
; CHECK: define private void @hidden.private
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
define private protected void @protected.private() {
|
|
; CHECK: define private void @protected.private
|
|
entry:
|
|
ret void
|
|
}
|