From 71a39f4b6f132c0ab4520a46e9ad5b363711e686 Mon Sep 17 00:00:00 2001
From: Duncan Sands <baldrick@free.fr>
Date: Thu, 25 Nov 2010 21:39:17 +0000
Subject: [PATCH] Remove explicit uses of -emit-llvm, the test infrastructure
 adds it automatically.  Use -S with llvm-gcc rather than -c, so tests can
 work when llvm-gcc is really dragonegg (which can output IR with -S but not
 -c).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120160 91177308-0d34-0410-b5e6-96231b3b80d8
---
 test/FrontendC++/2003-08-24-Cleanup.cpp            |  2 +-
 test/FrontendC++/2003-08-29-ArgPassingBug.cpp      |  2 +-
 test/FrontendC++/2003-11-08-ArrayAddress.cpp       |  2 +-
 .../2004-03-09-UnmangledBuiltinMethods.cpp         |  2 +-
 test/FrontendC++/2004-09-27-DidntEmitTemplate.cpp  |  2 +-
 test/FrontendC++/2005-07-21-VirtualBaseAccess.cpp  |  2 +-
 test/FrontendC++/2006-09-27-Debug-Protection.cpp   |  4 ++--
 test/FrontendC++/2006-10-30-ClassBitfield.cpp      |  2 +-
 test/FrontendC++/2006-11-30-ConstantExprCrash.cpp  |  2 +-
 test/FrontendC++/2007-01-02-UnboundedArray.cpp     |  2 +-
 test/FrontendC++/2007-01-06-ELF-Thunk-Sections.cpp |  2 +-
 test/FrontendC++/2007-01-06-PtrMethodInit.cpp      |  2 +-
 test/FrontendC++/2007-03-27-FunctionVarRename.cpp  |  4 ++--
 .../2007-04-11-InlineStorageClassC++.cpp           | 14 +++++++-------
 test/FrontendC++/2007-05-03-VectorInit.cpp         |  2 +-
 .../2007-05-16-ReverseBitFieldCrash.cpp            |  2 +-
 test/FrontendC++/2007-05-23-TryFinally.cpp         |  2 +-
 test/FrontendC++/2007-07-29-RestrictPtrArg.cpp     |  2 +-
 test/FrontendC++/2007-07-29-RestrictRefArg.cpp     |  2 +-
 test/FrontendC++/2007-08-01-RestrictMethod.cpp     |  2 +-
 .../2007-09-10-RecursiveTypeResolution.cpp         |  2 +-
 test/FrontendC++/2007-10-01-StructResize.cpp       |  2 +-
 test/FrontendC++/2008-10-29-WrongOffset.cpp        |  2 +-
 test/FrontendC++/2009-02-16-CtorNames-dbg.cpp      |  2 +-
 test/FrontendC++/2009-03-17-dbg.cpp                |  2 +-
 test/FrontendC++/2009-04-21-DtorNames-dbg.cpp      |  2 +-
 test/FrontendC++/2009-04-23-bool2.cpp              |  2 +-
 test/FrontendC++/2009-05-04-PureConstNounwind.cpp  |  2 +-
 test/FrontendC++/2009-06-16-DebugInfoCrash.cpp     |  2 +-
 test/FrontendC++/2009-06-20-DarwinPPCLayout.cpp    | 14 +++++++-------
 test/FrontendC++/2009-08-05-ZeroInitWidth.cpp      |  2 +-
 test/FrontendC++/2009-08-11-VectorRetTy.cpp        |  2 +-
 test/FrontendC++/2009-09-04-modify-crash.cpp       |  2 +-
 test/FrontendC++/2009-09-09-packed-layout.cpp      |  2 +-
 test/FrontendC++/2009-10-27-crash.cpp              |  2 +-
 test/FrontendC++/2010-03-22-empty-baseclass.cpp    |  2 +-
 .../2010-05-11-alwaysinlineinstantiation.cpp       |  4 ++--
 test/FrontendC++/2010-05-12-PtrToMember-Dbg.cpp    |  2 +-
 test/FrontendC++/2010-06-22-BitfieldInit.cpp       |  2 +-
 test/FrontendC++/2010-06-22-ZeroBitfield.cpp       |  2 +-
 test/FrontendC++/2010-07-19-nowarn.cpp             |  2 +-
 test/FrontendC++/2010-07-23-DeclLoc.cpp            |  2 +-
 test/FrontendC++/member-alignment.cpp              |  2 +-
 test/FrontendC++/ptr-to-method-devirt.cpp          |  4 ++--
 test/FrontendC++/varargs.cpp                       |  2 +-
 test/FrontendC++/weak-external.cpp                 |  2 +-
 .../x86-64-abi-sret-vs-2word-struct-param.cpp      |  2 +-
 47 files changed, 63 insertions(+), 63 deletions(-)

diff --git a/test/FrontendC++/2003-08-24-Cleanup.cpp b/test/FrontendC++/2003-08-24-Cleanup.cpp
index ab0d1a0d11c..9f20ad6b714 100644
--- a/test/FrontendC++/2003-08-24-Cleanup.cpp
+++ b/test/FrontendC++/2003-08-24-Cleanup.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep unwind
+// RUN: %llvmgxx -xc++ %s -S -o - | grep unwind
 
 struct S { ~S(); };
 
diff --git a/test/FrontendC++/2003-08-29-ArgPassingBug.cpp b/test/FrontendC++/2003-08-29-ArgPassingBug.cpp
index d4cddff3147..fa7e7f86b21 100644
--- a/test/FrontendC++/2003-08-29-ArgPassingBug.cpp
+++ b/test/FrontendC++/2003-08-29-ArgPassingBug.cpp
@@ -1,5 +1,5 @@
 
-// RUN: %llvmgcc -xc++ -c -o /dev/null %s |& not grep WARNING
+// RUN: %llvmgcc -xc++ -S -o /dev/null %s |& not grep WARNING
 
 struct iterator {
   iterator();
diff --git a/test/FrontendC++/2003-11-08-ArrayAddress.cpp b/test/FrontendC++/2003-11-08-ArrayAddress.cpp
index 9ad1b8f82f7..ad02b4a187f 100644
--- a/test/FrontendC++/2003-11-08-ArrayAddress.cpp
+++ b/test/FrontendC++/2003-11-08-ArrayAddress.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep getelementptr
+// RUN: %llvmgxx -xc++ %s -S -o - | grep getelementptr
 
 struct foo {
   int array[100];
diff --git a/test/FrontendC++/2004-03-09-UnmangledBuiltinMethods.cpp b/test/FrontendC++/2004-03-09-UnmangledBuiltinMethods.cpp
index b019e0c0ef3..a600e841e7a 100644
--- a/test/FrontendC++/2004-03-09-UnmangledBuiltinMethods.cpp
+++ b/test/FrontendC++/2004-03-09-UnmangledBuiltinMethods.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -xc++ -c -o - %s | llvm-dis | grep _ZN11AccessFlags6strlenEv
+// RUN: %llvmgcc -xc++ -S -o - %s | grep _ZN11AccessFlags6strlenEv
 
 struct AccessFlags {
   void strlen();
diff --git a/test/FrontendC++/2004-09-27-DidntEmitTemplate.cpp b/test/FrontendC++/2004-09-27-DidntEmitTemplate.cpp
index 706d541bee6..66b970cb6fd 100644
--- a/test/FrontendC++/2004-09-27-DidntEmitTemplate.cpp
+++ b/test/FrontendC++/2004-09-27-DidntEmitTemplate.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep callDefaultCtor | \
+// RUN: %llvmgxx -xc++ %s -S -o - | grep callDefaultCtor | \
 // RUN:   not grep declare
 
 // This is a testcase for LLVM PR445, which was a problem where the 
diff --git a/test/FrontendC++/2005-07-21-VirtualBaseAccess.cpp b/test/FrontendC++/2005-07-21-VirtualBaseAccess.cpp
index 7711cff6d36..ca600d6433d 100644
--- a/test/FrontendC++/2005-07-21-VirtualBaseAccess.cpp
+++ b/test/FrontendC++/2005-07-21-VirtualBaseAccess.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | opt -die | llvm-dis | not grep cast
+// RUN: %llvmgxx -xc++ %s -S -o - | opt -die -S | not grep cast
 
 void foo(int*);
 
diff --git a/test/FrontendC++/2006-09-27-Debug-Protection.cpp b/test/FrontendC++/2006-09-27-Debug-Protection.cpp
index cb09bd0a974..2a70a0f5b45 100644
--- a/test/FrontendC++/2006-09-27-Debug-Protection.cpp
+++ b/test/FrontendC++/2006-09-27-Debug-Protection.cpp
@@ -1,5 +1,5 @@
-// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep {i32 1,}
-// RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep {i32 2,}
+// RUN: %llvmgxx -O0 -S -g -o - %s | grep {i32 1,}
+// RUN: %llvmgxx -O0 -S -g -o - %s | grep {i32 2,}
 class A {
 public:
   int x;
diff --git a/test/FrontendC++/2006-10-30-ClassBitfield.cpp b/test/FrontendC++/2006-10-30-ClassBitfield.cpp
index bd3b173cf8f..b3b43fb30ce 100644
--- a/test/FrontendC++/2006-10-30-ClassBitfield.cpp
+++ b/test/FrontendC++/2006-10-30-ClassBitfield.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o -
+// RUN: %llvmgxx %s -S -o -
 // PR954
 
 struct _Refcount_Base   {
diff --git a/test/FrontendC++/2006-11-30-ConstantExprCrash.cpp b/test/FrontendC++/2006-11-30-ConstantExprCrash.cpp
index 365c8e80fbf..d351b9413af 100644
--- a/test/FrontendC++/2006-11-30-ConstantExprCrash.cpp
+++ b/test/FrontendC++/2006-11-30-ConstantExprCrash.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o -
+// RUN: %llvmgxx %s -S -o -
 // PR1027
 
 struct sys_var {
diff --git a/test/FrontendC++/2007-01-02-UnboundedArray.cpp b/test/FrontendC++/2007-01-02-UnboundedArray.cpp
index 648d19be62b..310308694b7 100644
--- a/test/FrontendC++/2007-01-02-UnboundedArray.cpp
+++ b/test/FrontendC++/2007-01-02-UnboundedArray.cpp
@@ -1,6 +1,6 @@
 // Make sure unbounded arrays compile with debug information.
 // 
-// RUN: %llvmgcc -O0 -c -g %s
+// RUN: %llvmgcc -O0 -S -g %s
 
 // PR1068
 
diff --git a/test/FrontendC++/2007-01-06-ELF-Thunk-Sections.cpp b/test/FrontendC++/2007-01-06-ELF-Thunk-Sections.cpp
index 654e11be1ff..5206640be10 100644
--- a/test/FrontendC++/2007-01-06-ELF-Thunk-Sections.cpp
+++ b/test/FrontendC++/2007-01-06-ELF-Thunk-Sections.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep gnu.linkonce.
+// RUN: %llvmgxx %s -S -o - | not grep gnu.linkonce.
 // PR1085
 
 class 
diff --git a/test/FrontendC++/2007-01-06-PtrMethodInit.cpp b/test/FrontendC++/2007-01-06-PtrMethodInit.cpp
index f87c8d888fc..beb79457b55 100644
--- a/test/FrontendC++/2007-01-06-PtrMethodInit.cpp
+++ b/test/FrontendC++/2007-01-06-PtrMethodInit.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o -
+// RUN: %llvmgxx %s -S -o -
 // PR1084
 
 extern "C"
diff --git a/test/FrontendC++/2007-03-27-FunctionVarRename.cpp b/test/FrontendC++/2007-03-27-FunctionVarRename.cpp
index 538d6df1813..6ff1284ddb4 100644
--- a/test/FrontendC++/2007-03-27-FunctionVarRename.cpp
+++ b/test/FrontendC++/2007-03-27-FunctionVarRename.cpp
@@ -1,5 +1,5 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep eprintf1
-// RUN: %llvmgxx %s -emit-llvm -S -o - | grep eprintf
+// RUN: %llvmgxx %s -S -o - | not grep eprintf1
+// RUN: %llvmgxx %s -S -o - | grep eprintf
 
 // Only one eprintf should exist in the output
 
diff --git a/test/FrontendC++/2007-04-11-InlineStorageClassC++.cpp b/test/FrontendC++/2007-04-11-InlineStorageClassC++.cpp
index eabcd573270..4c2aad397c8 100644
--- a/test/FrontendC++/2007-04-11-InlineStorageClassC++.cpp
+++ b/test/FrontendC++/2007-04-11-InlineStorageClassC++.cpp
@@ -1,16 +1,16 @@
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: %llvmgxx %s -S -O0 -o - | grep define | \
 // RUN:   grep xglobWeak | grep linkonce | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: %llvmgxx %s -S -O0 -o - | grep define | \
 // RUN:   grep xextWeak | grep linkonce | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: %llvmgxx %s -S -O0 -o - | grep define | \
 // RUN:   grep xWeaknoinline | grep weak | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: %llvmgxx %s -S -O0 -o - | grep define | \
 // RUN:   grep xWeakextnoinline | grep weak | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: %llvmgxx %s -S -O0 -o - | grep define | \
 // RUN:   grep xglobnoWeak | grep linkonce | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: %llvmgxx %s -S -O0 -o - | grep define | \
 // RUN:   grep xstatnoWeak | grep internal | count 1
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - | grep define | \
+// RUN: %llvmgxx %s -S -O0 -o - | grep define | \
 // RUN:   grep xextnoWeak | grep linkonce | count 1
 inline int xglobWeak(int) __attribute__((weak));
 inline int xglobWeak (int i) {
diff --git a/test/FrontendC++/2007-05-03-VectorInit.cpp b/test/FrontendC++/2007-05-03-VectorInit.cpp
index b87f4d4665c..af56d3a08a8 100644
--- a/test/FrontendC++/2007-05-03-VectorInit.cpp
+++ b/test/FrontendC++/2007-05-03-VectorInit.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -S -emit-llvm -O0 -o - 
+// RUN: %llvmgxx %s -S -O0 -o - 
 // PR1378
 
 typedef float v4sf __attribute__((vector_size(16)));
diff --git a/test/FrontendC++/2007-05-16-ReverseBitFieldCrash.cpp b/test/FrontendC++/2007-05-16-ReverseBitFieldCrash.cpp
index 8392c0b94a5..42342fc9486 100644
--- a/test/FrontendC++/2007-05-16-ReverseBitFieldCrash.cpp
+++ b/test/FrontendC++/2007-05-16-ReverseBitFieldCrash.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -emit-llvm -S -o -
+// RUN: %llvmgxx %s -S -o -
 
 #pragma reverse_bitfields on
 typedef unsigned long UINT32;
diff --git a/test/FrontendC++/2007-05-23-TryFinally.cpp b/test/FrontendC++/2007-05-23-TryFinally.cpp
index 38f0b021aba..c7971820ec7 100644
--- a/test/FrontendC++/2007-05-23-TryFinally.cpp
+++ b/test/FrontendC++/2007-05-23-TryFinally.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | ignore grep _Unwind_Resume | \
+// RUN: %llvmgxx %s -S -O2 -o - | ignore grep _Unwind_Resume | \
 // RUN:   wc -l | grep {\[23\]}
 
 struct One { };
diff --git a/test/FrontendC++/2007-07-29-RestrictPtrArg.cpp b/test/FrontendC++/2007-07-29-RestrictPtrArg.cpp
index d54dfbe5712..2e85abdf25e 100644
--- a/test/FrontendC++/2007-07-29-RestrictPtrArg.cpp
+++ b/test/FrontendC++/2007-07-29-RestrictPtrArg.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
+// RUN: %llvmgxx -S %s -o - | grep noalias
 
 void foo(int * __restrict myptr1, int * myptr2) {
   myptr1[0] = 0;
diff --git a/test/FrontendC++/2007-07-29-RestrictRefArg.cpp b/test/FrontendC++/2007-07-29-RestrictRefArg.cpp
index 0c28e4d27a2..128ddb3ab59 100644
--- a/test/FrontendC++/2007-07-29-RestrictRefArg.cpp
+++ b/test/FrontendC++/2007-07-29-RestrictRefArg.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
+// RUN: %llvmgxx -S %s -o - | grep noalias
 
 void foo(int & __restrict myptr1, int & myptr2) {
   myptr1 = 0;
diff --git a/test/FrontendC++/2007-08-01-RestrictMethod.cpp b/test/FrontendC++/2007-08-01-RestrictMethod.cpp
index b4922beab1b..feefaa1759c 100644
--- a/test/FrontendC++/2007-08-01-RestrictMethod.cpp
+++ b/test/FrontendC++/2007-08-01-RestrictMethod.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias
+// RUN: %llvmgxx -S %s -o - | grep noalias
 
 
 class foo {
diff --git a/test/FrontendC++/2007-09-10-RecursiveTypeResolution.cpp b/test/FrontendC++/2007-09-10-RecursiveTypeResolution.cpp
index f81394409d4..1fcf15f0d9d 100644
--- a/test/FrontendC++/2007-09-10-RecursiveTypeResolution.cpp
+++ b/test/FrontendC++/2007-09-10-RecursiveTypeResolution.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o -
+// RUN: %llvmgxx -S %s -o -
 // PR1634
 
 namespace Manta
diff --git a/test/FrontendC++/2007-10-01-StructResize.cpp b/test/FrontendC++/2007-10-01-StructResize.cpp
index d37057a901a..71109eb7b6a 100644
--- a/test/FrontendC++/2007-10-01-StructResize.cpp
+++ b/test/FrontendC++/2007-10-01-StructResize.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c %s -o /dev/null
+// RUN: %llvmgxx -S %s -o /dev/null
 
 #pragma pack(4)
 
diff --git a/test/FrontendC++/2008-10-29-WrongOffset.cpp b/test/FrontendC++/2008-10-29-WrongOffset.cpp
index 1b3be2132b1..c261c312376 100644
--- a/test/FrontendC++/2008-10-29-WrongOffset.cpp
+++ b/test/FrontendC++/2008-10-29-WrongOffset.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -c -o /dev/null
+// RUN: %llvmgxx %s -S -o /dev/null
 // PR2917
 
 #include <complex>
diff --git a/test/FrontendC++/2009-02-16-CtorNames-dbg.cpp b/test/FrontendC++/2009-02-16-CtorNames-dbg.cpp
index 8f1b598aa2b..eb69963e534 100644
--- a/test/FrontendC++/2009-02-16-CtorNames-dbg.cpp
+++ b/test/FrontendC++/2009-02-16-CtorNames-dbg.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -S -g --emit-llvm %s -o - | grep "\~A"
+// RUN: %llvmgcc -S -g %s -o - | grep "\~A"
 class A {
   int i;
 public:
diff --git a/test/FrontendC++/2009-03-17-dbg.cpp b/test/FrontendC++/2009-03-17-dbg.cpp
index 93da61873bf..6708e12f9b9 100644
--- a/test/FrontendC++/2009-03-17-dbg.cpp
+++ b/test/FrontendC++/2009-03-17-dbg.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o /dev/null -g
+// RUN: %llvmgxx -S %s -o /dev/null -g
 // XTARGET: darwin,linux
 // XFAIL: *
 template <typename T1,typename T2>
diff --git a/test/FrontendC++/2009-04-21-DtorNames-dbg.cpp b/test/FrontendC++/2009-04-21-DtorNames-dbg.cpp
index 997c3f70350..e3616da073b 100644
--- a/test/FrontendC++/2009-04-21-DtorNames-dbg.cpp
+++ b/test/FrontendC++/2009-04-21-DtorNames-dbg.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -c -g %s -o - | llc -O0 -o %t.s
+// RUN: %llvmgcc -S -g %s -o - | llc -O0 -o %t.s
 // RUN: %compile_c %t.s -o %t.o
 // PR4025
 
diff --git a/test/FrontendC++/2009-04-23-bool2.cpp b/test/FrontendC++/2009-04-23-bool2.cpp
index 8614a37d36c..2c76d982ea6 100644
--- a/test/FrontendC++/2009-04-23-bool2.cpp
+++ b/test/FrontendC++/2009-04-23-bool2.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o /dev/null
+// RUN: %llvmgxx -S %s -o /dev/null
 // g++.old-deja/g++.jason/bool2.C from gcc testsuite.
 // Crashed before 67975 went in.
 struct F {
diff --git a/test/FrontendC++/2009-05-04-PureConstNounwind.cpp b/test/FrontendC++/2009-05-04-PureConstNounwind.cpp
index a4b4653e122..e275c340a95 100644
--- a/test/FrontendC++/2009-05-04-PureConstNounwind.cpp
+++ b/test/FrontendC++/2009-05-04-PureConstNounwind.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -S -emit-llvm %s -o - | grep nounwind | count 4
+// RUN: %llvmgxx -S %s -o - | grep nounwind | count 4
 int c(void) __attribute__((const));
 int p(void) __attribute__((pure));
 int t(void);
diff --git a/test/FrontendC++/2009-06-16-DebugInfoCrash.cpp b/test/FrontendC++/2009-06-16-DebugInfoCrash.cpp
index b3758d2782c..c2a841b1a67 100644
--- a/test/FrontendC++/2009-06-16-DebugInfoCrash.cpp
+++ b/test/FrontendC++/2009-06-16-DebugInfoCrash.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o /dev/null -g
+// RUN: %llvmgxx -S %s -o /dev/null -g
 // This crashes if we try to emit debug info for TEMPLATE_DECL members.
 template <class T> class K2PtrVectorBase {};
 template <class T> class K2Vector {};
diff --git a/test/FrontendC++/2009-06-20-DarwinPPCLayout.cpp b/test/FrontendC++/2009-06-20-DarwinPPCLayout.cpp
index dcb2f16a5dc..e0bc043adad 100644
--- a/test/FrontendC++/2009-06-20-DarwinPPCLayout.cpp
+++ b/test/FrontendC++/2009-06-20-DarwinPPCLayout.cpp
@@ -1,10 +1,10 @@
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep baz | grep global | grep {struct.bar}
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep ccc | grep global | grep {struct.CC}
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep quux | grep global | grep {struct.bar}
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep foo | grep global | grep {struct.SRCFilter::FilterEntry}
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.bar} | grep {1 x i32}
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.CC} | grep {struct.payre<KBFP,float*} | grep {.base.32} | grep {1 x i32}
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.SRCFilter::FilterEntry} | not grep {1 x i32}
+// RUN: %llvmgxx -S -m32 %s -o - | grep baz | grep global | grep {struct.bar}
+// RUN: %llvmgxx -S -m32 %s -o - | grep ccc | grep global | grep {struct.CC}
+// RUN: %llvmgxx -S -m32 %s -o - | grep quux | grep global | grep {struct.bar}
+// RUN: %llvmgxx -S -m32 %s -o - | grep foo | grep global | grep {struct.SRCFilter::FilterEntry}
+// RUN: %llvmgxx -S -m32 %s -o - | grep {struct.bar} | grep {1 x i32}
+// RUN: %llvmgxx -S -m32 %s -o - | grep {struct.CC} | grep {struct.payre<KBFP,float*} | grep {.base.32} | grep {1 x i32}
+// RUN: %llvmgxx -S -m32 %s -o - | grep {struct.SRCFilter::FilterEntry} | not grep {1 x i32}
 // XFAIL: *
 // XTARGET: powerpc-apple-darwin
 
diff --git a/test/FrontendC++/2009-08-05-ZeroInitWidth.cpp b/test/FrontendC++/2009-08-05-ZeroInitWidth.cpp
index bc862e70bde..89a79f24463 100644
--- a/test/FrontendC++/2009-08-05-ZeroInitWidth.cpp
+++ b/test/FrontendC++/2009-08-05-ZeroInitWidth.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -c -emit-llvm %s -o -
+// RUN: %llvmgxx -S %s -o -
 // rdar://7114564
 struct A {
   unsigned long long : (sizeof(unsigned long long) * 8) - 16;
diff --git a/test/FrontendC++/2009-08-11-VectorRetTy.cpp b/test/FrontendC++/2009-08-11-VectorRetTy.cpp
index b2c3ba185b5..403b59d8f99 100644
--- a/test/FrontendC++/2009-08-11-VectorRetTy.cpp
+++ b/test/FrontendC++/2009-08-11-VectorRetTy.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -c -o /dev/null
+// RUN: %llvmgxx %s -S -o /dev/null
 // <rdar://problem/7096460>
 typedef void (*Func) ();
 typedef long long m64 __attribute__((__vector_size__(8), __may_alias__));
diff --git a/test/FrontendC++/2009-09-04-modify-crash.cpp b/test/FrontendC++/2009-09-04-modify-crash.cpp
index ac16f8c36d1..89274e09c7e 100644
--- a/test/FrontendC++/2009-09-04-modify-crash.cpp
+++ b/test/FrontendC++/2009-09-04-modify-crash.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -emit-llvm -fapple-kext -S -o -
+// RUN: %llvmgxx %s -fapple-kext -S -o -
 // The extra check in 71555 caused this to crash on Darwin X86
 // in an assert build.
 class foo {
diff --git a/test/FrontendC++/2009-09-09-packed-layout.cpp b/test/FrontendC++/2009-09-09-packed-layout.cpp
index a569f9f7876..921aad79f73 100644
--- a/test/FrontendC++/2009-09-09-packed-layout.cpp
+++ b/test/FrontendC++/2009-09-09-packed-layout.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -S -m32 -emit-llvm %s -o /dev/null
+// RUN: %llvmgxx -S -m32 %s -o /dev/null
 class X { 
  public:
   virtual ~X();
diff --git a/test/FrontendC++/2009-10-27-crash.cpp b/test/FrontendC++/2009-10-27-crash.cpp
index 21d0064c687..da73988b697 100644
--- a/test/FrontendC++/2009-10-27-crash.cpp
+++ b/test/FrontendC++/2009-10-27-crash.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -emit-llvm -S %s -o /dev/null
+// RUN: %llvmgxx -S %s -o /dev/null
 // Radar 7328944
 
 typedef struct
diff --git a/test/FrontendC++/2010-03-22-empty-baseclass.cpp b/test/FrontendC++/2010-03-22-empty-baseclass.cpp
index b6bdea40c3f..bb741c42c84 100644
--- a/test/FrontendC++/2010-03-22-empty-baseclass.cpp
+++ b/test/FrontendC++/2010-03-22-empty-baseclass.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -S -emit-llvm %s -o - -O2 | FileCheck %s
+// RUN: %llvmgxx -S %s -o - -O2 | FileCheck %s
 namespace boost {
   namespace detail {
     template <typename T> struct cv_traits_imp {};
diff --git a/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp b/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp
index 203b542b784..9203dbd0bd9 100644
--- a/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp
+++ b/test/FrontendC++/2010-05-11-alwaysinlineinstantiation.cpp
@@ -1,5 +1,5 @@
-// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | not grep ZN12basic_stringIcEC1Ev
-// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep ZN12basic_stringIcED1Ev | count 2
+// RUN: %llvmgxx -xc++ %s -S -o - | not grep ZN12basic_stringIcEC1Ev
+// RUN: %llvmgxx -xc++ %s -S -o - | grep ZN12basic_stringIcED1Ev | count 2
 
 template<class charT> 
 class basic_string
diff --git a/test/FrontendC++/2010-05-12-PtrToMember-Dbg.cpp b/test/FrontendC++/2010-05-12-PtrToMember-Dbg.cpp
index 66acfbe4b32..c2d6abe97fc 100644
--- a/test/FrontendC++/2010-05-12-PtrToMember-Dbg.cpp
+++ b/test/FrontendC++/2010-05-12-PtrToMember-Dbg.cpp
@@ -1,4 +1,4 @@
-//RUN: %llvmgxx -O0 -emit-llvm -S -g -o - %s | grep DW_TAG_auto_variable
+//RUN: %llvmgxx -O0 -S -g -o - %s | grep DW_TAG_auto_variable
 class Foo
 {
  public:
diff --git a/test/FrontendC++/2010-06-22-BitfieldInit.cpp b/test/FrontendC++/2010-06-22-BitfieldInit.cpp
index 1cfe1f9f6fd..8dceb78bfc6 100644
--- a/test/FrontendC++/2010-06-22-BitfieldInit.cpp
+++ b/test/FrontendC++/2010-06-22-BitfieldInit.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -g -c %s
+// RUN: %llvmgxx -g -S %s
 struct TEST2
 {
   int subid:32;
diff --git a/test/FrontendC++/2010-06-22-ZeroBitfield.cpp b/test/FrontendC++/2010-06-22-ZeroBitfield.cpp
index c979f8d9b91..9c4f2629f74 100644
--- a/test/FrontendC++/2010-06-22-ZeroBitfield.cpp
+++ b/test/FrontendC++/2010-06-22-ZeroBitfield.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -g -c %s
+// RUN: %llvmgxx -g -S %s
 struct s8_0 { unsigned : 0; };
 struct s8_1 { double x; };
 struct s8 { s8_0 a; s8_1 b; };
diff --git a/test/FrontendC++/2010-07-19-nowarn.cpp b/test/FrontendC++/2010-07-19-nowarn.cpp
index 8742bf15232..a61a84ff28b 100644
--- a/test/FrontendC++/2010-07-19-nowarn.cpp
+++ b/test/FrontendC++/2010-07-19-nowarn.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc %s -c -m32 -fasm-blocks -o /dev/null
+// RUN: %llvmgcc %s -S -m32 -fasm-blocks -o /dev/null
 // This should not warn about unreferenced label. 8195660.
 // XFAIL: *
 // XTARGET: x86,i386,i686
diff --git a/test/FrontendC++/2010-07-23-DeclLoc.cpp b/test/FrontendC++/2010-07-23-DeclLoc.cpp
index c72de3b3362..9bf432beb72 100644
--- a/test/FrontendC++/2010-07-23-DeclLoc.cpp
+++ b/test/FrontendC++/2010-07-23-DeclLoc.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -emit-llvm -S -g %s -o - | FileCheck %s
+// RUN: %llvmgxx -S -g %s -o - | FileCheck %s
 // Require the template function declaration refer to the correct filename.
 // First, locate the function decl in metadata, and pluck out the file handle:
 // CHECK: {{extract_dwarf_data_from_header.*extract_dwarf_data_from_header.*extract_dwarf_data_from_header.*[^ ]+", metadata !}}[[filehandle:[0-9]+]],
diff --git a/test/FrontendC++/member-alignment.cpp b/test/FrontendC++/member-alignment.cpp
index 6afc0aaede1..c5b20b27932 100644
--- a/test/FrontendC++/member-alignment.cpp
+++ b/test/FrontendC++/member-alignment.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %llvmgxx -S %s -o - | FileCheck %s
 // XFAIL: arm,powerpc
 
 // rdar://7268289
diff --git a/test/FrontendC++/ptr-to-method-devirt.cpp b/test/FrontendC++/ptr-to-method-devirt.cpp
index 358b801af55..a5ca5c76559 100644
--- a/test/FrontendC++/ptr-to-method-devirt.cpp
+++ b/test/FrontendC++/ptr-to-method-devirt.cpp
@@ -1,6 +1,6 @@
 // PR1602
-// RUN: %llvmgxx -c -emit-llvm %s -o - -O3 | llvm-dis | not grep ptrtoint
-// RUN: %llvmgxx -c -emit-llvm %s -o - -O3 | llvm-dis | grep getelementptr | count 1
+// RUN: %llvmgxx -S %s -o - -O3 | not grep ptrtoint
+// RUN: %llvmgxx -S %s -o - -O3 | grep getelementptr | count 1
 
 
 struct S { virtual void f(); };
diff --git a/test/FrontendC++/varargs.cpp b/test/FrontendC++/varargs.cpp
index 1c07aedd093..c4de76acc30 100644
--- a/test/FrontendC++/varargs.cpp
+++ b/test/FrontendC++/varargs.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %llvmgxx -S %s -o - | FileCheck %s
 // rdar://7309675
 // PR4678
 
diff --git a/test/FrontendC++/weak-external.cpp b/test/FrontendC++/weak-external.cpp
index 94360c2e97e..f4f0ba19ef3 100644
--- a/test/FrontendC++/weak-external.cpp
+++ b/test/FrontendC++/weak-external.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | not grep {_ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag}
+// RUN: %llvmgxx %s -S -O2 -o - | not grep {_ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag}
 // PR4262
 
 // The "basic_string" extern template instantiation declaration is supposed to
diff --git a/test/FrontendC++/x86-64-abi-sret-vs-2word-struct-param.cpp b/test/FrontendC++/x86-64-abi-sret-vs-2word-struct-param.cpp
index ec69afc2154..f81854e0cb9 100644
--- a/test/FrontendC++/x86-64-abi-sret-vs-2word-struct-param.cpp
+++ b/test/FrontendC++/x86-64-abi-sret-vs-2word-struct-param.cpp
@@ -1,4 +1,4 @@
-// RUN: %llvmgxx -S -emit-llvm %s -o - | grep byval | count 2
+// RUN: %llvmgxx -S %s -o - | grep byval | count 2
 // XTARGET: x86
 // PR4242
 // (PR 4242 bug is on 64-bit only, test passes on x86-32 as well)