diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-07-13 06:02:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-07-13 06:02:28 +0000 |
commit | a700f688282a1984164a2a95590eb39284fb4272 (patch) | |
tree | 448ba1a3af69e04737699b50b19d4e30683a6e32 /clang/test/CodeGen/available-externally-suppress.c | |
parent | 9b5561f4db6f5dad4e886083f94cf6479c852c26 (diff) | |
download | bcm5719-llvm-a700f688282a1984164a2a95590eb39284fb4272.tar.gz bcm5719-llvm-a700f688282a1984164a2a95590eb39284fb4272.zip |
Reinstate the optimization suppressing available_externally functions
at -O0. The only change from the previous patch is that we don't try
to generate virtual method thunks for an available_externally
function.
llvm-svn: 108230
Diffstat (limited to 'clang/test/CodeGen/available-externally-suppress.c')
-rw-r--r-- | clang/test/CodeGen/available-externally-suppress.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/available-externally-suppress.c b/clang/test/CodeGen/available-externally-suppress.c new file mode 100644 index 00000000000..c3b7a213baf --- /dev/null +++ b/clang/test/CodeGen/available-externally-suppress.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -emit-llvm -o - -O0 -triple x86_64-apple-darwin10 %s | FileCheck %s + +// Ensure that we don't emit available_externally functions at -O0. +int x; + +inline void f0(int y) { x = y; } + +// CHECK: define void @test() +// CHECK: declare void @f0(i32) +void test() { + f0(17); +} |