From 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 2 Dec 2012 13:20:44 +0000 Subject: Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2): http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974 --- lib/Frontend/CreateInvocationFromCommandLine.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'lib/Frontend/CreateInvocationFromCommandLine.cpp') diff --git a/lib/Frontend/CreateInvocationFromCommandLine.cpp b/lib/Frontend/CreateInvocationFromCommandLine.cpp index 0aca86e2c97f..d82cb6d05157 100644 --- a/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -11,9 +11,9 @@ // //===----------------------------------------------------------------------===// +#include "clang/Basic/DiagnosticOptions.h" #include "clang/Frontend/Utils.h" #include "clang/Frontend/CompilerInstance.h" -#include "clang/Frontend/DiagnosticOptions.h" #include "clang/Frontend/FrontendDiagnostic.h" #include "clang/Driver/Compilation.h" #include "clang/Driver/Driver.h" @@ -34,8 +34,8 @@ clang::createInvocationFromCommandLine(ArrayRef ArgList, if (!Diags.getPtr()) { // No diagnostics engine was provided, so create our own diagnostics object // with the default options. - DiagnosticOptions DiagOpts; - Diags = CompilerInstance::createDiagnostics(DiagOpts, ArgList.size(), + Diags = CompilerInstance::createDiagnostics(new DiagnosticOptions, + ArgList.size(), ArgList.begin()); } @@ -49,11 +49,6 @@ clang::createInvocationFromCommandLine(ArrayRef ArgList, // FIXME: We shouldn't have to pass in the path info. driver::Driver TheDriver("clang", llvm::sys::getDefaultTargetTriple(), "a.out", false, *Diags); - // Force driver to use clang. - // FIXME: This seems like a hack. Maybe the "Clang" tool subclass should be - // available for using it to get the arguments, thus avoiding the overkill - // of using the driver. - TheDriver.setForcedClangUse(); // Don't check that inputs exist, they may have been remapped. TheDriver.setCheckInputsExist(false); -- cgit v1.2.3