diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
| commit | 809500fc2c13c8173a16b052304d983864e4a1e1 (patch) | |
| tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/CodeGen/attr-minsize.cpp | |
| parent | be7c9ec198dcdb5bf73a35bfbb00b3333cb87909 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/attr-minsize.cpp')
| -rw-r--r-- | test/CodeGen/attr-minsize.cpp | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/test/CodeGen/attr-minsize.cpp b/test/CodeGen/attr-minsize.cpp index a422a62f2535..997194df7f90 100644 --- a/test/CodeGen/attr-minsize.cpp +++ b/test/CodeGen/attr-minsize.cpp @@ -7,29 +7,29 @@ // Check that we set the minsize attribute on each function // when Oz optimization level is set. +__attribute__((minsize)) int test1() { return 42; -// Oz: @{{.*}}test1{{.*}}minsize -// Oz: ret -// OTHER: @{{.*}}test1 -// OTHER-NOT: minsize -// OTHER: ret +// Oz: @{{.*}}test1{{.*}}[[MINSIZE:#[0-9]+]] +// OTHER: @{{.*}}test1{{.*}}[[MS:#[0-9]+]] } int test2() { return 42; -// Oz: @{{.*}}test2{{.*}}minsize +// Oz: @{{.*}}test2{{.*}}[[MINSIZE]] // Oz: ret // OTHER: @{{.*}}test2 -// OTHER-NOT: minsize +// OTHER-NOT: [[MS]] // OTHER: ret } -__attribute__((minsize)) int test3() { return 42; -// Oz: @{{.*}}test3{{.*}}minsize -// OTHER: @{{.*}}test3{{.*}}minsize +// Oz: @{{.*}}test3{{.*}}[[MINSIZE]] +// Oz: ret +// OTHER: @{{.*}}test3 +// OTHER-NOT: [[MS]] +// OTHER: ret } // Check that the minsize attribute is well propagated through @@ -44,16 +44,16 @@ void test4(T arg) { template void test4<int>(int arg); // Oz: define{{.*}}void @{{.*}}test4 -// Oz: minsize +// Oz: [[MINSIZE]] // OTHER: define{{.*}}void @{{.*}}test4 -// OTHER: minsize +// OTHER: [[MS]] template void test4<float>(float arg); // Oz: define{{.*}}void @{{.*}}test4 -// Oz: minsize +// Oz: [[MINSIZE]] // OTHER: define{{.*}}void @{{.*}}test4 -// OTHER: minsize +// OTHER: [[MS]] template<typename T> void test5(T arg) { @@ -63,13 +63,17 @@ void test5(T arg) { template void test5<int>(int arg); // Oz: define{{.*}}void @{{.*}}test5 -// Oz: minsize +// Oz: [[MINSIZE]] // OTHER: define{{.*}}void @{{.*}}test5 -// OTHER-NOT: minsize +// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}[[MS]] template void test5<float>(float arg); // Oz: define{{.*}}void @{{.*}}test5 -// Oz: minsize +// Oz: [[MINSIZE]] // OTHER: define{{.*}}void @{{.*}}test5 -// OTHER-NOT: minsize +// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}[[MS]] + +// Oz: attributes [[MINSIZE]] = { minsize{{.*}} } + +// OTHER: attributes [[MS]] = { minsize nounwind{{.*}} } |
