From 66db8af3aaa7cb4682ccace44915ff01bc89ebe0 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 20 Sep 2018 09:29:35 +0000 Subject: [PATCH] FileCheckify test/Driver/Xarch.c llvm-svn: 342636 --- clang/test/Driver/Xarch.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/clang/test/Driver/Xarch.c b/clang/test/Driver/Xarch.c index 34f9340..7260cfc 100644 --- a/clang/test/Driver/Xarch.c +++ b/clang/test/Driver/Xarch.c @@ -1,9 +1,12 @@ -// RUN: %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log -// RUN: grep ' "-O2" ' %t.log | count 1 -// RUN: %clang -target i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log -// RUN: not grep ' "-O2" ' %t.log -// RUN: grep "argument unused during compilation: '-Xarch_i386 -O2'" %t.log -// RUN: not %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log -// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -o'" %t.log | count 2 -// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -S'" %t.log +// RUN: %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2>&1 | FileCheck -check-prefix=O2ONCE %s +// O2ONCE: "-O2" +// O2ONCE-NOT: "-O2" +// RUN: %clang -target i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2>&1 | FileCheck -check-prefix=O2NONE %s +// O2NONE-NOT: "-O2" +// O2NONE: argument unused during compilation: '-Xarch_i386 -O2' + +// RUN: not %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2>&1 | FileCheck -check-prefix=INVALID %s +// INVALID: error: invalid Xarch argument: '-Xarch_i386 -o' +// INVALID: error: invalid Xarch argument: '-Xarch_i386 -S' +// INVALID: error: invalid Xarch argument: '-Xarch_i386 -o' -- 2.7.4