aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/CodeGen/2008-07-21-mixed-var-fn-decl.c5
-rw-r--r--test/CodeGen/2008-07-29-override-alias-decl.c15
-rw-r--r--test/CodeGen/builtin-unwind-init.c5
3 files changed, 21 insertions, 4 deletions
diff --git a/test/CodeGen/2008-07-21-mixed-var-fn-decl.c b/test/CodeGen/2008-07-21-mixed-var-fn-decl.c
index c55c86b2fc..59a3f38849 100644
--- a/test/CodeGen/2008-07-21-mixed-var-fn-decl.c
+++ b/test/CodeGen/2008-07-21-mixed-var-fn-decl.c
@@ -1,5 +1,8 @@
-// RUN: clang-cc -emit-llvm -o - %s | grep -e "@g[0-9] " | count 2
+// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s
int g0, f0();
int f1(), g1;
+// CHECK: @g0 = common global i32 0, align 4
+// CHECK: @g1 = common global i32 0, align 4
+
diff --git a/test/CodeGen/2008-07-29-override-alias-decl.c b/test/CodeGen/2008-07-29-override-alias-decl.c
index 4a36e0f13d..8729500296 100644
--- a/test/CodeGen/2008-07-29-override-alias-decl.c
+++ b/test/CodeGen/2008-07-29-override-alias-decl.c
@@ -1,7 +1,13 @@
-// RUN: clang-cc -emit-llvm -o - %s | grep -e "^@f" | count 1
+// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s
int x() { return 1; }
+// CHECK: %retval = alloca i32
+// CHECK: store i32 1, i32* %retval
+// CHECK: %0 = load i32* %retval
+// CHECK: ret i32 %0
+
+
int f() __attribute__((weak, alias("x")));
/* Test that we link to the alias correctly instead of making a new
@@ -10,3 +16,10 @@ int f();
int h() {
return f();
}
+
+// CHECK: %retval = alloca i32
+// CHECK: %call = call i32 (...)* @f()
+// CHECK: store i32 %call, i32* %retval
+// CHECK: %0 = load i32* %retval
+// CHECK: ret i32 %0
+
diff --git a/test/CodeGen/builtin-unwind-init.c b/test/CodeGen/builtin-unwind-init.c
index 49a016a304..56872f7434 100644
--- a/test/CodeGen/builtin-unwind-init.c
+++ b/test/CodeGen/builtin-unwind-init.c
@@ -1,4 +1,5 @@
-// RUN: clang-cc -emit-llvm < %s -o - | grep -F "llvm.eh.unwind.init"
+// RUN: clang-cc -emit-llvm < %s -o - | FileCheck %s
-int a() { __builtin_unwind_init(); }
+void a() { __builtin_unwind_init(); }
+// CHECK: call void @llvm.eh.unwind.init()