2015-04-22 12:11:00 +08:00
|
|
|
; RUN: llvm-link %s -override %S/Inputs/override-with-internal-linkage.ll -S | FileCheck %s
|
|
|
|
; RUN: llvm-link -override %S/Inputs/override-with-internal-linkage.ll %s -S | FileCheck %s
|
|
|
|
|
2015-04-25 00:56:24 +08:00
|
|
|
; CHECK-LABEL: define i32 @main(
|
2015-04-22 12:11:00 +08:00
|
|
|
; CHECK-NEXT: entry:
|
2015-04-25 00:56:24 +08:00
|
|
|
; CHECK-NEXT: call i32 @foo2(
|
|
|
|
define i32 @main(i32 %argc, i8** %argv) {
|
|
|
|
entry:
|
|
|
|
%a = call i32 @foo(i32 2)
|
|
|
|
ret i32 %a
|
|
|
|
}
|
2015-04-22 12:11:00 +08:00
|
|
|
|
2015-04-25 00:56:24 +08:00
|
|
|
; CHECK-LABEL: define internal i32 @foo2(
|
2015-04-22 12:11:00 +08:00
|
|
|
; CHECK-NEXT: entry:
|
2015-04-25 00:56:24 +08:00
|
|
|
; CHECK-NEXT: %add = add nsw i32 %i, %i
|
|
|
|
; CHECK-NEXT: ret i32 %add
|
2015-04-22 12:11:00 +08:00
|
|
|
define internal i32 @foo(i32 %i) {
|
|
|
|
entry:
|
|
|
|
%add = add nsw i32 %i, %i
|
|
|
|
ret i32 %add
|
|
|
|
}
|
|
|
|
|
2015-04-25 00:56:24 +08:00
|
|
|
; CHECK-LABEL: define i32 @foo(
|
|
|
|
; CHECK-NEXT: entry:
|
|
|
|
; CHECK-NEXT: ret i32 4
|