[llvm-commits] [llvm] r51258 - /llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c

Duncan Sands baldrick at free.fr
Mon May 19 09:44:44 PDT 2008


Author: baldrick
Date: Mon May 19 11:44:44 2008
New Revision: 51258

URL: http://llvm.org/viewvc/llvm-project?rev=51258&view=rev
Log:
Check that always_inline functions are inlined
whether or not -funit-at-a-time is used (C++ uses
it, C doesn't) - it was working before only when
not doing unit-at-a-time.

Added:
    llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c

Added: llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c?rev=51258&view=auto

==============================================================================
--- llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c (added)
+++ llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c Mon May 19 11:44:44 2008
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc %s -S -fno-unit-at-a-time -emit-llvm -O0 -o - | not grep sabrina
+// RUN: %llvmgcc %s -S -funit-at-a-time -emit-llvm -O0 -o - | not grep sabrina
+
+static inline int sabrina (void) __attribute__((always_inline));
+static inline int sabrina (void)
+{
+  return 13;
+}
+int bar (void)
+{
+  return sabrina () + 68;
+}





More information about the llvm-commits mailing list