diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-07-15 22:58:18 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-07-15 22:58:18 +0000 |
| commit | 8997690ff1070e9ab4f9b7bf57f5ba45763a796c (patch) | |
| tree | 8d27f0f367d93aaf4c2c75cbfb86b69261af09c1 /clang/test/CodeGen | |
| parent | b3026df9fac64fdfdeb147e077ad893b763e1e3b (diff) | |
| download | bcm5719-llvm-8997690ff1070e9ab4f9b7bf57f5ba45763a796c.tar.gz bcm5719-llvm-8997690ff1070e9ab4f9b7bf57f5ba45763a796c.zip | |
Don't suppress the emission of available_externally functions marked
with always_inline attribute. Thanks to Howard for the tip.
llvm-svn: 108469
Diffstat (limited to 'clang/test/CodeGen')
| -rw-r--r-- | clang/test/CodeGen/available-externally-suppress.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGen/available-externally-suppress.c b/clang/test/CodeGen/available-externally-suppress.c index c3b7a213baf..fb8c9c61d9b 100644 --- a/clang/test/CodeGen/available-externally-suppress.c +++ b/clang/test/CodeGen/available-externally-suppress.c @@ -10,3 +10,17 @@ inline void f0(int y) { x = y; } void test() { f0(17); } + +inline int __attribute__((always_inline)) f1(int x) { + int blarg = 0; + for (int i = 0; i < x; ++i) + blarg = blarg + x * i; + return blarg; +} + +int test1(int x) { + // CHECK: br i1 + // CHECK-NOT: call + // CHECK: ret i32 + return f1(x); +} |

