1 ; RUN: split-file %s %t
2 ; RUN: opt -module-summary %t/a.s -o %t/a.bc
3 ; RUN: opt -module-summary %t/b.s -o %t/b.bc
4 ; RUN: not llvm-lto2 run %t/a.bc %t/b.bc -o %t/out -save-temps 2>&1 \
5 ; RUN: -r=%t/a.bc,callee,px \
6 ; RUN: -r=%t/b.bc,callee,x \
7 ; RUN: -r=%t/b.bc,caller,px
9 ; TODO: As part of LTO, we check that types match, but *we don't yet check that
10 ; attributes match!!! What should happen if we remove "dontcall-error" from the
11 ; definition or declaration of @callee?
13 ; CHECK: call to callee marked "dontcall-error"
16 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
17 target triple = "x86_64-unknown-linux-gnu"
19 define i32 @callee() "dontcall-error" noinline {
24 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
25 target triple = "x86_64-unknown-linux-gnu"
27 declare i32 @callee() "dontcall-error"
29 define i32 @caller() {
31 %0 = call i32 @callee()