mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Pass in Args.size() - 1, not Args.size() so the nullptr arg is not included in "argc".
Swift SVN r13762
This commit is contained in:
@@ -48,7 +48,7 @@ bool swift::CompilerInstance::setup(const CompilerInvocation &Invok) {
|
||||
++i)
|
||||
Args.push_back(Invok.getFrontendOptions().LLVMArgs[i].c_str());
|
||||
Args.push_back(nullptr);
|
||||
llvm::cl::ParseCommandLineOptions(Args.size(), Args.data());
|
||||
llvm::cl::ParseCommandLineOptions(Args.size()-1, Args.data());
|
||||
}
|
||||
|
||||
Context.reset(new ASTContext(Invocation.getLangOptions(),
|
||||
|
||||
Reference in New Issue
Block a user