diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-09-21 18:52:24 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-09-21 18:52:24 +0000 |
commit | 510d7c71e2d60f9b5f5ba1c5c1123e9d5cd0070e (patch) | |
tree | 26ed39340526bf87967b77e3831d6baa33b36ba4 /clang/test/CodeGen/attr-func-def.c | |
parent | 8fb9b94f7f0d6598105cdece99649f307268ff7a (diff) | |
download | bcm5719-llvm-510d7c71e2d60f9b5f5ba1c5c1123e9d5cd0070e.tar.gz bcm5719-llvm-510d7c71e2d60f9b5f5ba1c5c1123e9d5cd0070e.zip |
Remove attributes minsize and optsize, which conflict with optnone.
This commit fixes an assert that is triggered when optnone is being
added to an IR function that is already marked with minsize and optsize.
rdar://problem/22723716
Differential Revision: http://reviews.llvm.org/D13004
llvm-svn: 248191
Diffstat (limited to 'clang/test/CodeGen/attr-func-def.c')
-rw-r--r-- | clang/test/CodeGen/attr-func-def.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGen/attr-func-def.c b/clang/test/CodeGen/attr-func-def.c new file mode 100644 index 00000000000..ceafa1220f1 --- /dev/null +++ b/clang/test/CodeGen/attr-func-def.c @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 -emit-llvm -Oz -o - %s | FileCheck %s + +// CHECK: define i32 @foo2(i32 %a) [[ATTRS2:#[0-9]+]] { +// CHECK: define i32 @foo1(i32 %a) [[ATTRS1:#[0-9]+]] { + +int foo1(int); + +int foo2(int a) { + return foo1(a + 2); +} + +__attribute__((optnone)) +int foo1(int a) { + return a + 1; +} + +// CHECK: attributes [[ATTRS2]] = { {{.*}}optsize{{.*}} } +// CHECK: attributes [[ATTRS1]] = { {{.*}}optnone{{.*}} } |