aboutsummaryrefslogtreecommitdiff
path: root/tools/driver/cc1_main.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-29 20:58:50 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-29 20:58:50 +0000
commite03245246acbec5c46e93b68ec6942ce42b9e256 (patch)
treecb4d0ae874c7b690a8d2ee2bf30a7b2ba424719b /tools/driver/cc1_main.cpp
parent4cbe3b64be7b1b312e4e555e8c93ef8e5bd3a820 (diff)
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
Diffstat (limited to 'tools/driver/cc1_main.cpp')
-rw-r--r--tools/driver/cc1_main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
index 5097c25832..3b8757b528 100644
--- a/tools/driver/cc1_main.cpp
+++ b/tools/driver/cc1_main.cpp
@@ -53,7 +53,7 @@ int cc1_main(Diagnostic &Diags, const char **ArgBegin, const char **ArgEnd,
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 @@ int cc1_main(Diagnostic &Diags, const char **ArgBegin, const char **ArgEnd,
// same thing.
CompilerInvocation Invocation2;
CompilerInvocation::CreateFromArgs(Invocation2, Invocation2Args.begin(),
- Invocation2Args.end(), Argv0, MainAddr);
+ Invocation2Args.end(), Argv0, MainAddr,
+ Diags);
// FIXME: Implement CompilerInvocation comparison.
if (true) {