summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-14 09:24:02 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-14 09:24:02 +0000
commit7ef7bab7e3d06f660b059b903c231f100bb13cc5 (patch)
treed472a7615b5c7e413aa62a77d0777c1a9cf76478 /test/CodeGen
parent8ba99c00327a4394e7568244d6cffd6e62625a7a (diff)
Notes
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/always_inline.c9
-rw-r--r--test/CodeGen/lineno-dbginfo.c7
-rw-r--r--test/CodeGen/target-data.c7
-rw-r--r--test/CodeGen/x86_32-arguments.c5
4 files changed, 24 insertions, 4 deletions
diff --git a/test/CodeGen/always_inline.c b/test/CodeGen/always_inline.c
index cb32e3b62181..c12b45404d2d 100644
--- a/test/CodeGen/always_inline.c
+++ b/test/CodeGen/always_inline.c
@@ -1,5 +1,6 @@
// RUN: clang -emit-llvm -S -o %t %s &&
-// RUN: grep '@f0' %t | count 0 &&
+// RUN: not grep '@f0' %t &&
+// RUN: not grep 'call ' %t &&
// RUN: clang -mllvm -disable-llvm-optzns -emit-llvm -S -o %t %s &&
// RUN: grep '@f0' %t | count 2
@@ -11,3 +12,9 @@ static int __attribute__((always_inline)) f0() {
int f1() {
return f0();
}
+
+// PR4372
+inline int f2() __attribute__((always_inline));
+int f2() { return 7; }
+int f3(void) { return f2(); }
+
diff --git a/test/CodeGen/lineno-dbginfo.c b/test/CodeGen/lineno-dbginfo.c
index fe9e59ac2d70..12c32ce9dd4b 100644
--- a/test/CodeGen/lineno-dbginfo.c
+++ b/test/CodeGen/lineno-dbginfo.c
@@ -1,5 +1,6 @@
-// RUN: echo "#include <stdio.h>" > %t.h
-// RUN: clang -S -save-temps -g -include %t.h %s -emit-llvm -o %t.ll
-// RUN: grep "i32 5" %t.ll
+// RUN: echo "#include <stdio.h>" > %t.h &&
+// RUN: clang -S -save-temps -g -include %t.h %s -emit-llvm -o %t.ll &&
+// RUN: grep "i32 5" %t.ll &&
+// RUN: rm -f lineno-dbginfo.i
// outer is at line number 5.
int outer = 42;
diff --git a/test/CodeGen/target-data.c b/test/CodeGen/target-data.c
new file mode 100644
index 000000000000..9d73d5c6300d
--- /dev/null
+++ b/test/CodeGen/target-data.c
@@ -0,0 +1,7 @@
+// RUN: clang-cc -triple i686-unknown-unknown -emit-llvm -o %t %s &&
+// RUN: grep 'target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"' %t &&
+// RUN: clang-cc -triple i686-apple-darwin9 -emit-llvm -o %t %s &&
+// RUN: grep 'target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"' %t &&
+// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
+// RUN: grep 'target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"' %t &&
+// RUN: true
diff --git a/test/CodeGen/x86_32-arguments.c b/test/CodeGen/x86_32-arguments.c
index 8980c66b2072..43a3ab246c71 100644
--- a/test/CodeGen/x86_32-arguments.c
+++ b/test/CodeGen/x86_32-arguments.c
@@ -154,4 +154,9 @@ struct s37 { float c[1][1]; } f37(void) {}
// RUN: grep 'define void @f38(.struct.s38. noalias sret .agg.result)' %t &&
struct s38 { char a[3]; short b; } f38(void) {}
+// RUN: grep 'define void @f39(.struct.s39. byval align 16 .x)' %t &&
+typedef int v39 __attribute((vector_size(16)));
+struct s39 { v39 x; };
+void f39(struct s39 x) {}
+
// RUN: true