mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
9cb90e7c15
split module can see each other. If it is keeping a symbol that already has a non local linkage, it doesn't need to change it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166908 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
540 B
LLVM
24 lines
540 B
LLVM
; RUN: llvm-extract -func foo -S < %s | FileCheck %s
|
|
; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s
|
|
|
|
; Test that we don't convert weak_odr to external definitions.
|
|
|
|
; CHECK: @bar = external global i32
|
|
; CHECK: define weak_odr i32* @foo() {
|
|
; CHECK-NEXT: ret i32* @bar
|
|
; CHECK-NEXT: }
|
|
|
|
; DELETE: @bar = weak_odr global i32 42
|
|
; DELETE: declare i32* @foo()
|
|
|
|
@bar = weak_odr global i32 42
|
|
|
|
define weak_odr i32* @foo() {
|
|
ret i32* @bar
|
|
}
|
|
|
|
define void @g() {
|
|
%c = call i32* @foo()
|
|
ret void
|
|
}
|