summaryrefslogtreecommitdiff
path: root/test/CFrontend
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-15 20:08:37 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-15 20:08:37 +0000
commitdcb925e917bdd05d67fe31a8556efda8b1af2606 (patch)
treecc8c225ab3b5b5542cc85d24c1c093e8bfc79730 /test/CFrontend
parentfe560b8c8529bd2380452a9713eb591c545c4301 (diff)
downloadllvm-dcb925e917bdd05d67fe31a8556efda8b1af2606.tar.gz
llvm-dcb925e917bdd05d67fe31a8556efda8b1af2606.tar.bz2
llvm-dcb925e917bdd05d67fe31a8556efda8b1af2606.tar.xz
For PR1319: Upgrade to new test harness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend')
-rw-r--r--test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr2
-rw-r--r--test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr2
-rw-r--r--test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr2
-rw-r--r--test/CFrontend/2004-11-27-InvalidConstantExpr.c2
-rw-r--r--test/CFrontend/2004-11-27-StaticFunctionRedeclare.c3
-rw-r--r--test/CFrontend/2005-02-27-MarkGlobalConstant.c2
-rw-r--r--test/CFrontend/2005-09-20-ComplexConstants.c1
-rw-r--r--test/CFrontend/2005-09-24-AsmUserPrefix.c4
-rw-r--r--test/CFrontend/2005-12-04-AttributeUsed.c3
-rw-r--r--test/CFrontend/2005-12-04-DeclarationLineNumbers.c2
-rw-r--r--test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c3
-rw-r--r--test/CFrontend/2006-01-23-FileScopeAsm.c2
-rw-r--r--test/CFrontend/2006-03-03-MissingInitializer.c2
-rw-r--r--test/CFrontend/2006-09-28-SimpleAsm.c5
-rw-r--r--test/CFrontend/2006-12-14-ordered_expr.c2
-rw-r--r--test/CFrontend/2007-01-24-InlineAsmCModifier.c5
-rw-r--r--test/CFrontend/2007-02-16-WritableStrings.c5
-rw-r--r--test/CFrontend/2007-02-25-C-DotDotDot.c3
-rw-r--r--test/CFrontend/2007-03-05-DataLayout.c3
-rw-r--r--test/CFrontend/2007-04-11-InlineAsmStruct.c2
-rw-r--r--test/CFrontend/2007-04-11-InlineAsmUnion.c2
-rw-r--r--test/CFrontend/2007-04-11-InlineStorageClassC89.c23
-rw-r--r--test/CFrontend/2007-04-11-InlineStorageClassC99.c23
-rw-r--r--test/CFrontend/2007-04-13-InlineAsmStruct2.c2
-rw-r--r--test/CFrontend/2007-04-13-InlineAsmUnion2.c2
-rw-r--r--test/CFrontend/bit-accurate-int.c3
-rw-r--r--test/CFrontend/cast-to-bool.c5
-rw-r--r--test/CFrontend/dg.exp4
-rw-r--r--test/CFrontend/extern-weak.c4
-rw-r--r--test/CFrontend/hidden-visibility.c2
-rw-r--r--test/CFrontend/sret.c4
31 files changed, 74 insertions, 55 deletions
diff --git a/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr b/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr
index 705b2590a6..094067293b 100644
--- a/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr
+++ b/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr
@@ -1,4 +1,4 @@
-/* RUN: %llvmgcc -xc %s -c -o - | dis | not grep cast
+/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep cast
*/
void test(int* array, long long N) {
diff --git a/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr b/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr
index 4bdbf988bd..39412e5f84 100644
--- a/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr
+++ b/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr
@@ -1,4 +1,4 @@
-/* RUN: %llvmgcc -xc %s -c -o - | dis | not grep __builtin_
+/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep __builtin_
*
* __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp
* just like explicit setjmp/longjmp calls are.
diff --git a/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr b/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr
index 288593c5da..6fc077d3e8 100644
--- a/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr
+++ b/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep 'llvm.*address' | wc -l | grep 4
+// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.*address | wc -l | grep 4
void *test1() {
return __builtin_return_address(1);
diff --git a/test/CFrontend/2004-11-27-InvalidConstantExpr.c b/test/CFrontend/2004-11-27-InvalidConstantExpr.c
index 54468a5645..ee8642fa3a 100644
--- a/test/CFrontend/2004-11-27-InvalidConstantExpr.c
+++ b/test/CFrontend/2004-11-27-InvalidConstantExpr.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -S -o - | not grep 'foo\* sub'
+// RUN: %llvmgcc %s -S -o - | not grep {foo\\* sub}
// This should not produce a subtrace constantexpr of a pointer
struct foo {
int Y;
diff --git a/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c b/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c
index abc6fbbff6..0193bc301a 100644
--- a/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c
+++ b/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c
@@ -1,4 +1,5 @@
-// RUN: %llvmgcc -S 2004-11-27-StaticFunctionRedeclare.c -o - | gccas | llvm-dis | not grep 'declare int.*func'
+// RUN: %llvmgcc -c -emit-llvm 2004-11-27-StaticFunctionRedeclare.c -o - | \
+// RUN: opt -std-compile-opts | llvm-dis | not grep {declare int.*func}
// There should not be an unresolved reference to func here. Believe it or not,
// the "expected result" is a function named 'func' which is internal and
diff --git a/test/CFrontend/2005-02-27-MarkGlobalConstant.c b/test/CFrontend/2005-02-27-MarkGlobalConstant.c
index 100c79c82b..4d24d0c673 100644
--- a/test/CFrontend/2005-02-27-MarkGlobalConstant.c
+++ b/test/CFrontend/2005-02-27-MarkGlobalConstant.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -xc %s -S -o - | grep 'internal constant '
+// RUN: %llvmgcc -xc %s -S -o - | grep {internal constant }
// The synthetic global made by the CFE for big initializer should be marked
// constant.
diff --git a/test/CFrontend/2005-09-20-ComplexConstants.c b/test/CFrontend/2005-09-20-ComplexConstants.c
index 34dd64a3cb..db98fc2385 100644
--- a/test/CFrontend/2005-09-20-ComplexConstants.c
+++ b/test/CFrontend/2005-09-20-ComplexConstants.c
@@ -1,4 +1,3 @@
-// RUN: %llvmgcc %s -S -o - && \
// RUN: %llvmgcc %s -S -o - | llvm-as -o /dev/null -f
const double _Complex x[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
diff --git a/test/CFrontend/2005-09-24-AsmUserPrefix.c b/test/CFrontend/2005-09-24-AsmUserPrefix.c
index 9db7f69270..9b9b153e27 100644
--- a/test/CFrontend/2005-09-24-AsmUserPrefix.c
+++ b/test/CFrontend/2005-09-24-AsmUserPrefix.c
@@ -1,6 +1,4 @@
-// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts &&
-// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | llc &&
-// RUN: %llvmgcc %s -S -o - | llvm-as | llc -std-compile-opts | llc | \
+// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | llc | \
// RUN: not grep _foo2
void foo() __asm__("foo2");
diff --git a/test/CFrontend/2005-12-04-AttributeUsed.c b/test/CFrontend/2005-12-04-AttributeUsed.c
index a3da1c3e64..33e27e89f4 100644
--- a/test/CFrontend/2005-12-04-AttributeUsed.c
+++ b/test/CFrontend/2005-12-04-AttributeUsed.c
@@ -1,4 +1,5 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | grep llvm.used | grep foo | grep X
+// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | \
+// RUN: grep llvm.used | grep foo | grep X
int X __attribute__((used));
int Y;
diff --git a/test/CFrontend/2005-12-04-DeclarationLineNumbers.c b/test/CFrontend/2005-12-04-DeclarationLineNumbers.c
index ab176c7ee1..0ced92e553 100644
--- a/test/CFrontend/2005-12-04-DeclarationLineNumbers.c
+++ b/test/CFrontend/2005-12-04-DeclarationLineNumbers.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -S -g -o - | grep 'llvm.dbg.stoppoint.*i32 14'
+// RUN: %llvmgcc %s -S -g -o - | grep {llvm.dbg.stoppoint.*i32 14}
// PR664: ensure that line #'s are emitted for declarations
diff --git a/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c b/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c
index 645f40c04b..d5ed837d2b 100644
--- a/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c
+++ b/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c
@@ -1,5 +1,4 @@
-// RUN: %llvmgcc -S %s -o - | grep 'llvm.ctlz.i32(i32'
-// RUNMEIFWEHADSIGNEDTYPES: %llvmgcc -S %s -o - | not grep 'llvm.ctlz.i32(i32'
+// RUN: %llvmgcc -S %s -o - | grep {llvm.ctlz.i32(i32} | wc -l | grep 2
unsigned t2(unsigned X) {
return __builtin_clz(X);
diff --git a/test/CFrontend/2006-01-23-FileScopeAsm.c b/test/CFrontend/2006-01-23-FileScopeAsm.c
index 14f85ac0b6..57f79392ed 100644
--- a/test/CFrontend/2006-01-23-FileScopeAsm.c
+++ b/test/CFrontend/2006-01-23-FileScopeAsm.c
@@ -1,5 +1,5 @@
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
-// RUN: llvm-dis | grep foo[12345] | wc -l | grep 5
+// RUN: llvm-dis | grep {foo\[12345\]} | wc -l | grep 5
__asm__ ("foo1");
__asm__ ("foo2");
diff --git a/test/CFrontend/2006-03-03-MissingInitializer.c b/test/CFrontend/2006-03-03-MissingInitializer.c
index e791784e50..0d09d297d1 100644
--- a/test/CFrontend/2006-03-03-MissingInitializer.c
+++ b/test/CFrontend/2006-03-03-MissingInitializer.c
@@ -1,5 +1,5 @@
// RUN: %llvmgcc %s -S -o - | llvm-as | opt -std-compile-opts | \
-// RUN: llvm-dis | grep '@nate.*internal global i32 0'
+// RUN: llvm-dis | grep {@nate.*internal global i32 0}
struct X { int *XX; int Y;};
diff --git a/test/CFrontend/2006-09-28-SimpleAsm.c b/test/CFrontend/2006-09-28-SimpleAsm.c
index ca8dbac380..e3040200a6 100644
--- a/test/CFrontend/2006-09-28-SimpleAsm.c
+++ b/test/CFrontend/2006-09-28-SimpleAsm.c
@@ -1,6 +1,5 @@
-// RUN: %llvmgcc %s -S -o /dev/null &&
-// RUN: %llvmgcc %s -S -o - | grep 'ext: xorl %eax, eax; movl' &&
-// RUN: %llvmgcc %s -S -o - | grep 'nonext: xorl %eax, %eax; mov'
+// RUN: %llvmgcc %s -S -o - | grep {ext: xorl %eax, eax; movl}
+// RUN: %llvmgcc %s -S -o - | grep {nonext: xorl %eax, %eax; mov}
// PR924
void bar() {
diff --git a/test/CFrontend/2006-12-14-ordered_expr.c b/test/CFrontend/2006-12-14-ordered_expr.c
index 090b989aff..8ff2eb6072 100644
--- a/test/CFrontend/2006-12-14-ordered_expr.c
+++ b/test/CFrontend/2006-12-14-ordered_expr.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -O3 -S %s -o - | grep 'fcmp ord float %X, %Y'
+// RUN: %llvmgcc -O3 -S %s -o - | grep {fcmp ord float %X, %Y}
int test2(float X, float Y) {
return !__builtin_isunordered(X, Y);
diff --git a/test/CFrontend/2007-01-24-InlineAsmCModifier.c b/test/CFrontend/2007-01-24-InlineAsmCModifier.c
index d4bffc3725..5735cce11e 100644
--- a/test/CFrontend/2007-01-24-InlineAsmCModifier.c
+++ b/test/CFrontend/2007-01-24-InlineAsmCModifier.c
@@ -1,5 +1,6 @@
-// Verify that the %c modifier works and strips off any prefixes from immediates.
-// RUN: %llvmgcc -S %s -o - | llvm-as | llc | grep 'pickANumber: 789514'
+// Verify that the %c modifier works and strips off any prefixes from
+// immediates.
+// RUN: %llvmgcc -S %s -o - | llvm-as | llc | grep {pickANumber: 789514}
void foo() {
__asm__ volatile("/* " "pickANumber" ": %c0 */"::"i"(0xC0C0A));
diff --git a/test/CFrontend/2007-02-16-WritableStrings.c b/test/CFrontend/2007-02-16-WritableStrings.c
index f26d50b352..d11fa089db 100644
--- a/test/CFrontend/2007-02-16-WritableStrings.c
+++ b/test/CFrontend/2007-02-16-WritableStrings.c
@@ -1,7 +1,8 @@
// Test the -fwritable-strings option.
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | grep 'internal global' &&
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep 'internal constant'
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm -fwritable-strings %s | \
+// RUN: grep {internal global}
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {internal constant}
char *X = "foo";
diff --git a/test/CFrontend/2007-02-25-C-DotDotDot.c b/test/CFrontend/2007-02-25-C-DotDotDot.c
index 541609b7e2..969602200c 100644
--- a/test/CFrontend/2007-02-25-C-DotDotDot.c
+++ b/test/CFrontend/2007-02-25-C-DotDotDot.c
@@ -1,4 +1,5 @@
-// RUN: %llvmgcc -O0 -S -o - -emit-llvm -fno-inline -fno-unit-at-a-time %s | grep 'call float @foo'
+// RUN: %llvmgcc -O0 -S -o - -emit-llvm -fno-inline -fno-unit-at-a-time %s | \
+// RUN: grep {call float @foo}
// Make sure the call to foo is compiled as:
// call float @foo()
diff --git a/test/CFrontend/2007-03-05-DataLayout.c b/test/CFrontend/2007-03-05-DataLayout.c
index d7326d4384..18819f1690 100644
--- a/test/CFrontend/2007-03-05-DataLayout.c
+++ b/test/CFrontend/2007-03-05-DataLayout.c
@@ -1,6 +1,7 @@
// Testcase for PR1242
// RUN: %llvmgcc -S %s -o - | grep datalayout | \
-// RUN: not grep '"[Ee]-p:[36][24]:[36][24]"'
+// RUN: not grep {"\[Ee\]-p:\[36\]\[24\]:\[36\]\[24\]"}
+// END.
#include <stdlib.h>
#define NDIM 3
#define BODY 01
diff --git a/test/CFrontend/2007-04-11-InlineAsmStruct.c b/test/CFrontend/2007-04-11-InlineAsmStruct.c
index 8f7bc83648..c70ce29760 100644
--- a/test/CFrontend/2007-04-11-InlineAsmStruct.c
+++ b/test/CFrontend/2007-04-11-InlineAsmStruct.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call i32 asm'
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call i32 asm}
struct V { short X, Y; };
int bar() {
diff --git a/test/CFrontend/2007-04-11-InlineAsmUnion.c b/test/CFrontend/2007-04-11-InlineAsmUnion.c
index e4ea69a39e..62e4b5c41c 100644
--- a/test/CFrontend/2007-04-11-InlineAsmUnion.c
+++ b/test/CFrontend/2007-04-11-InlineAsmUnion.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call i32 asm'
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call i32 asm}
union U { int x; char* p; };
void foo() {
diff --git a/test/CFrontend/2007-04-11-InlineStorageClassC89.c b/test/CFrontend/2007-04-11-InlineStorageClassC89.c
index 365e3375b2..ca4ed331ca 100644
--- a/test/CFrontend/2007-04-11-InlineStorageClassC89.c
+++ b/test/CFrontend/2007-04-11-InlineStorageClassC89.c
@@ -1,10 +1,19 @@
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | grep weak | wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | grep weak | wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xWeaknoinline | grep weak wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xWeakextnoinline | grep weak wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xstatnoWeak | grep internal | wc -l | grep 1
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep declare | grep xextnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xglobWeak | \
+// RUN: grep weak | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | \
+// RUN: grep weak | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xglobnoWeak | grep -v internal | grep -v weak | \
+// RUN: grep -v linkonce | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xstatnoWeak | grep internal | wc -l | grep 1
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep declare | \
+// RUN: grep xextnoWeak | grep -v internal | grep -v weak | \
+// RUN: grep -v linkonce | wc -l | grep 1
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;
diff --git a/test/CFrontend/2007-04-11-InlineStorageClassC99.c b/test/CFrontend/2007-04-11-InlineStorageClassC99.c
index d9ab8d3151..2f09268b3f 100644
--- a/test/CFrontend/2007-04-11-InlineStorageClassC99.c
+++ b/test/CFrontend/2007-04-11-InlineStorageClassC99.c
@@ -1,10 +1,19 @@
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | grep xglobWeak | grep extern_weak | wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xextWeak | grep weak | wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xWeaknoinline | grep weak wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xWeakextnoinline | grep weak wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | grep xglobnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xstatnoWeak | grep internal | wc -l | grep 1
-// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | grep xextnoWeak | grep -v internal | grep -v weak | grep -v linkonce | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
+// RUN: grep xglobWeak | grep extern_weak | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xextWeak | grep weak | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xWeaknoinline | grep weak | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xWeakextnoinline | grep weak | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep declare | \
+// RUN: grep xglobnoWeak | grep -v internal | grep -v weak | \
+// RUN: grep -v linkonce | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xstatnoWeak | grep internal | wc -l | grep 1
+// RUN: %llvmgcc -std=c99 %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: grep xextnoWeak | grep -v internal | grep -v weak | \
+// RUN: grep -v linkonce | wc -l | grep 1
inline int xglobWeak(int) __attribute__((weak));
inline int xglobWeak (int i) {
return i*2;
diff --git a/test/CFrontend/2007-04-13-InlineAsmStruct2.c b/test/CFrontend/2007-04-13-InlineAsmStruct2.c
index 8639b763a3..e4870e75be 100644
--- a/test/CFrontend/2007-04-13-InlineAsmStruct2.c
+++ b/test/CFrontend/2007-04-13-InlineAsmStruct2.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm'
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
struct V { short X, Y; };
int bar() {
diff --git a/test/CFrontend/2007-04-13-InlineAsmUnion2.c b/test/CFrontend/2007-04-13-InlineAsmUnion2.c
index 76bd7841a3..284654d223 100644
--- a/test/CFrontend/2007-04-13-InlineAsmUnion2.c
+++ b/test/CFrontend/2007-04-13-InlineAsmUnion2.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -S -emit-llvm -o - | grep 'call void asm'
+// RUN: %llvmgcc %s -S -emit-llvm -o - | grep {call void asm}
union U { int x; char* p; };
void foo() {
diff --git a/test/CFrontend/bit-accurate-int.c b/test/CFrontend/bit-accurate-int.c
index 181ddb05a4..868ca953c6 100644
--- a/test/CFrontend/bit-accurate-int.c
+++ b/test/CFrontend/bit-accurate-int.c
@@ -1,5 +1,4 @@
-// RUN: %llvmgcc -S %s -o - /dev/null 2>&1 > /dev/null | \
-// RUN: not grep warning
+// RUN: ignore %llvmgcc -S %s -o - /dev/null |& not grep warning
// XFAIL: *
#define ATTR_BITS(N) __attribute__((bitwidth(N)))
diff --git a/test/CFrontend/cast-to-bool.c b/test/CFrontend/cast-to-bool.c
index 04e174e46e..5d6c20a39a 100644
--- a/test/CFrontend/cast-to-bool.c
+++ b/test/CFrontend/cast-to-bool.c
@@ -1,5 +1,6 @@
-// RUN: %llvmgcc -S %s -o - | grep 'trunc.*to bool'
-// RUN: %llvmgcc -S %s -o - | llvm-as | opt -instcombine | llc -march=x86 | grep 'test.*1'
+// RUN: %llvmgcc -S %s -o - | grep {trunc.*to i8}
+// RUN: %llvmgcc -S %s -o - | llvm-as | opt -instcombine | llc -march=x86 | \
+// RUN: grep {test.*1}
int
main ( int argc, char** argv)
{
diff --git a/test/CFrontend/dg.exp b/test/CFrontend/dg.exp
index ff34508c3c..879685ca87 100644
--- a/test/CFrontend/dg.exp
+++ b/test/CFrontend/dg.exp
@@ -1,3 +1,3 @@
-load_lib llvm-dg.exp
+load_lib llvm.exp
-llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
diff --git a/test/CFrontend/extern-weak.c b/test/CFrontend/extern-weak.c
index 5154b0e133..b131f3343d 100644
--- a/test/CFrontend/extern-weak.c
+++ b/test/CFrontend/extern-weak.c
@@ -1,5 +1,5 @@
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak &&
-// RUN: %llvmgcc -O3 -S -o - -emit-llvm | llvm-as | llc
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
void foo() __attribute__((weak_import));
diff --git a/test/CFrontend/hidden-visibility.c b/test/CFrontend/hidden-visibility.c
index 2bfecac262..fc2ae444b4 100644
--- a/test/CFrontend/hidden-visibility.c
+++ b/test/CFrontend/hidden-visibility.c
@@ -1,3 +1,3 @@
-// RUN: %llvmgcc %s -emit-llvm -S -o - | grep 'hidden global'
+// RUN: %llvmgcc %s -emit-llvm -S -o - | grep {hidden global}
int X __attribute__ ((__visibility__ ("hidden"))) = 123;
diff --git a/test/CFrontend/sret.c b/test/CFrontend/sret.c
index b82ef31250..5324cae368 100644
--- a/test/CFrontend/sret.c
+++ b/test/CFrontend/sret.c
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep 'sret' | wc -l | grep '5'
+// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep sret | wc -l | grep 5
struct abc {
int a;
@@ -12,4 +12,4 @@ struct abc foo2();
void bar() {
struct abc dummy1 = foo1();
struct abc dummy2 = foo2();
-} \ No newline at end of file
+}