diff options
author | Edward O'Callaghan <eocallaghan@auroraux.org> | 2009-10-26 20:49:20 +0000 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@auroraux.org> | 2009-10-26 20:49:20 +0000 |
commit | 07e72fd5cbfa46a5e9459a057ec0077cd4167d7f (patch) | |
tree | be5237b482e9f87bc89a1ac9768a71a02cbb44bf | |
parent | ef78ac60136dc694ed383b3d0109224d97791d2f (diff) |
Convert a few tests to FileCheck for PR5307.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85154 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/2008-07-21-mixed-var-fn-decl.c | 5 | ||||
-rw-r--r-- | test/CodeGen/2008-07-29-override-alias-decl.c | 15 | ||||
-rw-r--r-- | test/CodeGen/builtin-unwind-init.c | 5 |
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() |