1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -O0 -mcpu=generic -mtriple=i686-linux-gnu -relocation-model=pic | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -O0 -mcpu=generic -mtriple=i686-linux-gnu -fast-isel -relocation-model=pic | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -O0 -mcpu=generic -mtriple=x86_64-linux-gnu -relocation-model=pic | FileCheck %s 4*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -O0 -mcpu=generic -mtriple=x86_64-linux-gnu -fast-isel -relocation-model=pic | FileCheck %s 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: bar: 7*9880d681SAndroid Build Coastguard Worker; CHECK: call{{l|q}} foo{{$}} 8*9880d681SAndroid Build Coastguard Worker; CHECK: call{{l|q}} weak_odr_foo{{$}} 9*9880d681SAndroid Build Coastguard Worker; CHECK: call{{l|q}} weak_foo{{$}} 10*9880d681SAndroid Build Coastguard Worker; CHECK: call{{l|q}} internal_foo{{$}} 11*9880d681SAndroid Build Coastguard Worker; CHECK: call{{l|q}} ext_baz@PLT 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Workerdefine weak void @weak_foo() { 14*9880d681SAndroid Build Coastguard Worker ret void 15*9880d681SAndroid Build Coastguard Worker} 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Workerdefine weak_odr void @weak_odr_foo() { 18*9880d681SAndroid Build Coastguard Worker ret void 19*9880d681SAndroid Build Coastguard Worker} 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Workerdefine internal void @internal_foo() { 22*9880d681SAndroid Build Coastguard Worker ret void 23*9880d681SAndroid Build Coastguard Worker} 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workerdeclare i32 @ext_baz() 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Workerdefine void @foo() { 28*9880d681SAndroid Build Coastguard Worker ret void 29*9880d681SAndroid Build Coastguard Worker} 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Workerdefine void @bar() { 32*9880d681SAndroid Build Coastguard Workerentry: 33*9880d681SAndroid Build Coastguard Worker call void @foo() 34*9880d681SAndroid Build Coastguard Worker call void @weak_odr_foo() 35*9880d681SAndroid Build Coastguard Worker call void @weak_foo() 36*9880d681SAndroid Build Coastguard Worker call void @internal_foo() 37*9880d681SAndroid Build Coastguard Worker call i32 @ext_baz() 38*9880d681SAndroid Build Coastguard Worker ret void 39*9880d681SAndroid Build Coastguard Worker} 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Worker; -fpie for local global data tests should be added here 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!0, !1} 44*9880d681SAndroid Build Coastguard Worker!0 = !{i32 1, !"PIC Level", i32 1} 45*9880d681SAndroid Build Coastguard Worker!1 = !{i32 1, !"PIE Level", i32 1} 46