summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/inline.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-14 16:44:36 +0000
committerChris Lattner <sabre@nondot.org>2009-04-14 16:44:36 +0000
commit02e987f3e8f431c7369e9100a8473b7be6867039 (patch)
tree59a7a54d9578acc0fd0609997879beb89f513517 /clang/test/CodeGen/inline.c
parenteaad6b70a9d2aac292ea39cdf7a5e674204b8841 (diff)
downloadbcm5719-llvm-02e987f3e8f431c7369e9100a8473b7be6867039.tar.gz
bcm5719-llvm-02e987f3e8f431c7369e9100a8473b7be6867039.zip
implement codegen support for __attribute((__gnuc_inline__)),
pulling some attribute munging stuff into GetLinkageForFunction. This should fix PR3986 llvm-svn: 69045
Diffstat (limited to 'clang/test/CodeGen/inline.c')
-rw-r--r--clang/test/CodeGen/inline.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/CodeGen/inline.c b/clang/test/CodeGen/inline.c
index fa2794780b6..7ddfd7645d1 100644
--- a/clang/test/CodeGen/inline.c
+++ b/clang/test/CodeGen/inline.c
@@ -1,21 +1,27 @@
+// RUN: echo "C89 tests:" &&
// RUN: clang %s -emit-llvm -S -o %t -std=c89 &&
// RUN: grep "define available_externally i32 @ei()" %t &&
// RUN: grep "define i32 @foo()" %t &&
// RUN: grep "define i32 @bar()" %t &&
// RUN: grep "define void @unreferenced1()" %t &&
// RUN: not grep unreferenced2 %t &&
+// RUN: grep "define void @gnu_inline()" %t &&
+// RUN: echo "\nC99 tests:" &&
// RUN: clang %s -emit-llvm -S -o %t -std=c99 &&
// RUN: grep "define available_externally i32 @ei()" %t &&
// RUN: grep "define available_externally i32 @foo()" %t &&
// RUN: grep "define i32 @bar()" %t &&
// RUN: not grep unreferenced %t &&
+// RUN: grep "define void @gnu_inline()" %t &&
+// RUN: echo "\nC++ tests:" &&
// RUN: clang %s -emit-llvm -S -o %t -std=c++98 &&
// RUN: grep "define available_externally i32 @_Z2eiv()" %t &&
// RUN: grep "define linkonce_odr i32 @_Z3foov()" %t &&
// RUN: grep "define i32 @_Z3barv()" %t &&
-// RUN: not grep unreferenced %t
+// RUN: not grep unreferenced %t &&
+// RUN: grep "define void @_Z10gnu_inlinev()" %t
extern inline int ei() { return 123; }
@@ -29,3 +35,4 @@ int bar() { return foo(); }
inline void unreferenced1() {}
extern inline void unreferenced2() {}
+__inline __attribute((__gnuc_inline__)) void gnu_inline() {}
OpenPOWER on IntegriCloud