r222685 - testing: make test use FileCheck
Tim Northover
tnorthover at apple.com
Mon Nov 24 13:03:34 PST 2014
Author: tnorthover
Date: Mon Nov 24 15:03:34 2014
New Revision: 222685
URL: http://llvm.org/viewvc/llvm-project?rev=222685&view=rev
Log:
testing: make test use FileCheck
The "grep internal | count" was fragile when your source or remote paths could
contain the word "internal".
Modified:
cfe/trunk/test/CodeGen/merge-statics.c
Modified: cfe/trunk/test/CodeGen/merge-statics.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/merge-statics.c?rev=222685&r1=222684&r2=222685&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/merge-statics.c (original)
+++ cfe/trunk/test/CodeGen/merge-statics.c Mon Nov 24 15:03:34 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 < %s -emit-llvm | grep internal | count 1
+// RUN: %clang_cc1 < %s -emit-llvm | FileCheck %s
// The two decls for 'a' should merge into one llvm GlobalVariable.
@@ -11,3 +11,6 @@ static struct s a = {
10
};
+// CHECK-NOT: internal global
+// CHECK: @a = internal global %struct.s { i32 10 }
+// CHECK-NOT: internal-global
More information about the cfe-commits
mailing list