aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/inline0/t1.c
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/inline0/t1.c')
-rw-r--r--llvm/tools/inline0/t1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/tools/inline0/t1.c b/llvm/tools/inline0/t1.c
new file mode 100644
index 0000000..ee4ab1f
--- /dev/null
+++ b/llvm/tools/inline0/t1.c
@@ -0,0 +1,9 @@
+#ifdef ALWAYS_INLINE
+__attribute__((always_inline))
+#endif
+int foo(int a, int b) {
+ int s= 0;
+ for(int i = a; i < b; ++i)
+ s+=i;
+ return s*3;
+}