llvm-project/llvm/test/Transforms/Inline/2007-06-25-WeakInline.ll

19 lines
375 B
LLVM
Raw Normal View History

; RUN: opt < %s -inline -S | FileCheck %s
; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
; 'bar' can be overridden at link-time, don't inline it.
define weak void @bar() {
; CHECK-LABEL: define weak void @bar()
entry:
ret void
}
define void @foo() {
; CHECK-LABEL: define void @foo()
entry:
tail call void @bar()
; CHECK: tail call void @bar()
ret void
}