llvm-6502/test/Transforms/GlobalOpt/2009-03-06-Anonymous.ll
David Majnemer f44809c898 GlobalOpt: Don't swap private for internal linkage
There were transforms whose *intent* was to downgrade the linkage of
external objects to have internal linkage.

However, it fired on things with private linkage as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212104 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-01 15:26:50 +00:00

24 lines
341 B
LLVM

; RUN: opt < %s -globalopt -S | FileCheck %s
global i32 0
; CHECK-DAG: @0 = internal global i32 0
private global i32 0
; CHECK-DAG: @1 = private global i32 0
define i32* @2() {
ret i32* @0
}
; CHECK-DAG: define internal fastcc i32* @2()
define i32* @f() {
entry:
call i32* @2()
ret i32* %0
}
define i32* @g() {
entry:
ret i32* @1
}