From 3176e97f130184ece0e1a21352c8124cc83ff24a Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 30 Dec 2015 11:49:41 +0000 Subject: Vendor import of clang trunk r256633: https://llvm.org/svn/llvm-project/cfe/trunk@256633 --- lib/Frontend/CreateInvocationFromCommandLine.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/Frontend/CreateInvocationFromCommandLine.cpp') diff --git a/lib/Frontend/CreateInvocationFromCommandLine.cpp b/lib/Frontend/CreateInvocationFromCommandLine.cpp index 2afd23f..3019164 100644 --- a/lib/Frontend/CreateInvocationFromCommandLine.cpp +++ b/lib/Frontend/CreateInvocationFromCommandLine.cpp @@ -39,15 +39,13 @@ clang::createInvocationFromCommandLine(ArrayRef ArgList, Diags = CompilerInstance::createDiagnostics(new DiagnosticOptions); } - SmallVector Args; - Args.push_back(""); // FIXME: Remove dummy argument. - Args.insert(Args.end(), ArgList.begin(), ArgList.end()); + SmallVector Args(ArgList.begin(), ArgList.end()); // FIXME: Find a cleaner way to force the driver into restricted modes. Args.push_back("-fsyntax-only"); // FIXME: We shouldn't have to pass in the path info. - driver::Driver TheDriver("clang", llvm::sys::getDefaultTargetTriple(), + driver::Driver TheDriver(Args[0], llvm::sys::getDefaultTargetTriple(), *Diags); // Don't check that inputs exist, they may have been remapped. -- cgit v1.1