testing: make test use FileCheck
authorTim Northover <tnorthover@apple.com>
Mon, 24 Nov 2014 21:03:34 +0000 (21:03 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 24 Nov 2014 21:03:34 +0000 (21:03 +0000)
The "grep internal | count" was fragile when your source or remote paths could
contain the word "internal".

llvm-svn: 222685

clang/test/CodeGen/merge-statics.c

index 6716935..4baf902 100644 (file)
@@ -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