34 lines · plain
1; RUN: split-file %s %t2; RUN: opt -module-summary %t/a.s -o %t/a.bc3; RUN: opt -module-summary %t/b.s -o %t/b.bc4; 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,px8 9; TODO: As part of LTO, we check that types match, but *we don't yet check that10; attributes match!!! What should happen if we remove "dontcall-error" from the11; definition or declaration of @callee?12 13; CHECK: call to callee marked "dontcall-error"14 15;--- a.s16target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"17target triple = "x86_64-unknown-linux-gnu"18 19define i32 @callee() "dontcall-error" noinline {20 ret i32 4221}22 23;--- b.s24target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"25target triple = "x86_64-unknown-linux-gnu"26 27declare i32 @callee() "dontcall-error"28 29define i32 @caller() {30entry:31 %0 = call i32 @callee()32 ret i32 %033}34