Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
 - Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90092 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
index 5097c25..3b8757b 100644
--- a/tools/driver/cc1_main.cpp
+++ b/tools/driver/cc1_main.cpp
@@ -53,7 +53,7 @@
   llvm::errs() << "cc1 creating invocation.\n";
   CompilerInvocation Invocation;
   CompilerInvocation::CreateFromArgs(Invocation, ArgBegin, ArgEnd,
-                                     Argv0, MainAddr);
+                                     Argv0, MainAddr, Diags);
 
   // Convert the invocation back to argument strings.
   std::vector<std::string> InvocationArgs;
@@ -72,7 +72,8 @@
   // same thing.
   CompilerInvocation Invocation2;
   CompilerInvocation::CreateFromArgs(Invocation2, Invocation2Args.begin(),
-                                     Invocation2Args.end(), Argv0, MainAddr);
+                                     Invocation2Args.end(), Argv0, MainAddr,
+                                     Diags);
 
   // FIXME: Implement CompilerInvocation comparison.
   if (true) {