Merge pull request #14814 from jrose-apple/dump-truck

Dump (some) filelists in the PrettyStackTrace
This commit is contained in:
Jordan Rose
2018-03-12 09:13:20 -07:00
committed by GitHub
10 changed files with 165 additions and 49 deletions

View File

@@ -81,9 +81,11 @@ SourceFileKind CompilerInvocation::getSourceFileKind() const {
llvm_unreachable("Unhandled InputFileKind in switch.");
}
static bool ParseFrontendArgs(FrontendOptions &opts, ArgList &args,
DiagnosticEngine &diags) {
return ArgsToFrontendOptionsConverter(diags, args, opts).convert();
static bool ParseFrontendArgs(
FrontendOptions &opts, ArgList &args, DiagnosticEngine &diags,
SmallVectorImpl<std::unique_ptr<llvm::MemoryBuffer>> *buffers) {
ArgsToFrontendOptionsConverter converter(diags, args, opts);
return converter.convert(buffers);
}
static void diagnoseSwiftVersion(Optional<version::Version> &vers, Arg *verArg,
@@ -978,9 +980,12 @@ bool ParseMigratorArgs(MigratorOptions &Opts,
return false;
}
bool CompilerInvocation::parseArgs(ArrayRef<const char *> Args,
DiagnosticEngine &Diags,
StringRef workingDirectory) {
bool CompilerInvocation::parseArgs(
ArrayRef<const char *> Args,
DiagnosticEngine &Diags,
SmallVectorImpl<std::unique_ptr<llvm::MemoryBuffer>>
*ConfigurationFileBuffers,
StringRef workingDirectory) {
using namespace options;
if (Args.empty())
@@ -1006,7 +1011,8 @@ bool CompilerInvocation::parseArgs(ArrayRef<const char *> Args,
return true;
}
if (ParseFrontendArgs(FrontendOpts, ParsedArgs, Diags)) {
if (ParseFrontendArgs(FrontendOpts, ParsedArgs, Diags,
ConfigurationFileBuffers)) {
return true;
}