diff options
Diffstat (limited to 'llvm/test/Transforms/ForcedFunctionAttrs/forced.ll')
-rw-r--r-- | llvm/test/Transforms/ForcedFunctionAttrs/forced.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ForcedFunctionAttrs/forced.ll b/llvm/test/Transforms/ForcedFunctionAttrs/forced.ll new file mode 100644 index 00000000000..a41e9c0efbe --- /dev/null +++ b/llvm/test/Transforms/ForcedFunctionAttrs/forced.ll @@ -0,0 +1,12 @@ +; RUN: opt < %s -S -forceattrs | FileCheck %s --check-prefix=CHECK-CONTROL +; RUN: opt < %s -S -forceattrs -force-attribute foo:noinline | FileCheck %s --check-prefix=CHECK-FOO +; RUN: opt < %s -S -passes=forceattrs -force-attribute foo:noinline | FileCheck %s --check-prefix=CHECK-FOO + +; CHECK-CONTROL: define void @foo() { +; CHECK-FOO: define void @foo() #0 { +define void @foo() { + ret void +} + + +; CHECK-FOO: attributes #0 = { noinline } |