diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-23 22:59:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-23 22:59:07 +0000 |
commit | a54934ae9d278448fb557366eb4a79a8cb3fc606 (patch) | |
tree | 840df7c6eee7773d11a40219125eccd77714da57 /test/Transforms/Inline/noinline.ll | |
parent | bc7a902713c4e3f13a93c383e647d2a18712f447 (diff) |
add some accessors to callsite/callinst/invokeinst to check
for the noinline attribute, and make the inliner refuse to
inline a call site when the call site is marked noinline even
if the callee isn't. This fixes PR6682.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/Inline/noinline.ll')
-rw-r--r-- | test/Transforms/Inline/noinline.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/Inline/noinline.ll b/test/Transforms/Inline/noinline.ll new file mode 100644 index 0000000000..dc3f6e0030 --- /dev/null +++ b/test/Transforms/Inline/noinline.ll @@ -0,0 +1,18 @@ +; RUN: opt %s -inline -S | FileCheck %s +; PR6682 +declare void @foo() nounwind + +define void @bar() nounwind { +entry: + tail call void @foo() nounwind + ret void +} + +define void @bazz() nounwind { +entry: + tail call void @bar() nounwind noinline + ret void +} + +; CHECK: define void @bazz() +; CHECK: call void @bar() |