pull .ll and .bc writing out of the ASTConsumer destructors into some top
level code in clang.  This is a cleanup, but does implement "-o" for 
-emit-llvm.  One effect of this is that "clang foo.c -emit-llvm" will now
emit into foo.ll instead of stdout.  Use "clang foo.c -emit-llvm -o -" or 
"clang < foo.c -emit-llvm" to get the old behavior.

llvm-svn: 46791
diff --git a/clang/test/CodeGen/bitfield.c b/clang/test/CodeGen/bitfield.c
index 441a54a..70414a9 100644
--- a/clang/test/CodeGen/bitfield.c
+++ b/clang/test/CodeGen/bitfield.c
@@ -1,4 +1,4 @@
-// RUN: clang %s -emit-llvm > %t1
+// RUN: clang %s -emit-llvm -o - > %t1
 // RUN: grep "shl i32 %tmp, 19" %t1 &&
 // RUN: grep "ashr i32 %tmp1, 19" %t1 &&
 // RUN: grep "shl i16 %tmp4, 1" %t1 &&
diff --git a/clang/test/CodeGen/merge-statics.c b/clang/test/CodeGen/merge-statics.c
index 56fd7d4..1e0d689 100644
--- a/clang/test/CodeGen/merge-statics.c
+++ b/clang/test/CodeGen/merge-statics.c
@@ -1,4 +1,4 @@
-// RUN: clang %s -emit-llvm | grep internal | count 1
+// RUN: clang < %s -emit-llvm | grep internal | count 1
 
 // The two decls for 'a' should merge into one llvm GlobalVariable.
 
diff --git a/clang/test/CodeGen/struct-x86-darwin.c b/clang/test/CodeGen/struct-x86-darwin.c
index faa5bb2..3d3729d 100644
--- a/clang/test/CodeGen/struct-x86-darwin.c
+++ b/clang/test/CodeGen/struct-x86-darwin.c
@@ -1,4 +1,4 @@
-// RUN: clang %s -emit-llvm > %t1
+// RUN: clang < %s -emit-llvm > %t1
 // Run  grep "STest1 = type { i32, \[4 x i16\], double }" %t1 &&
 // RUN: grep "STest2 = type { i16, i16, i32, i32 }" %t1 &&
 // RUN: grep "STest3 = type { i8, i8, i16, i32 }" %t1 &&