121
|
1 ; RUN: llvm-as %s -o %t1.bc
|
|
2 ; RUN: llvm-as %p/Inputs/thumb.ll -o %t2.bc
|
|
3 ; RUN: llvm-link %t1.bc %t2.bc -S 2> %t3.out | FileCheck %s
|
|
4 ; RUN: FileCheck --allow-empty --input-file %t3.out --check-prefix STDERR %s
|
|
5
|
|
6 target triple = "armv7-linux-gnueabihf"
|
|
7
|
|
8 declare i32 @foo(i32 %a, i32 %b);
|
|
9
|
|
10 define i32 @main() {
|
|
11 entry:
|
|
12 %add = call i32 @foo(i32 10, i32 20)
|
|
13 ret i32 %add
|
|
14 }
|
|
15
|
|
16 ; CHECK: define i32 @main() {
|
|
17 ; CHECK: define i32 @foo(i32 %a, i32 %b) [[ARM_ATTRS:#[0-9]+]]
|
|
18 ; CHECK: define i32 @bar(i32 %a, i32 %b) [[THUMB_ATTRS:#[0-9]+]]
|
|
19
|
|
20 ; CHECK: attributes [[ARM_ATTRS]] = { "target-features"="-thumb-mode" }
|
|
21 ; CHECK: attributes [[THUMB_ATTRS]] = { "target-features"="+thumb-mode" }
|
|
22
|
|
23 ; STDERR-NOT: warning: Linking two modules of different target triples:
|