mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Dump input filelists in the PrettyStackTrace
This may help us reproduce a failing build when all we have is a build log, and will become much more important in batch mode when we /really/ need to know what ended up in what batch. For now, this doesn't include /output/ filelists, because David's about to mess with that code anyway to make things better around supplementary outputs in batch mode. There is one weirdness there, though, which is that ArgsToFrontendInputsConverter peeks at the outputs to see whether we're doing single-threaded or multi-threaded WMO.
This commit is contained in:
@@ -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,
|
||||
@@ -961,9 +963,12 @@ bool ParseMigratorArgs(MigratorOptions &Opts, llvm::Triple &Triple,
|
||||
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())
|
||||
@@ -989,7 +994,8 @@ bool CompilerInvocation::parseArgs(ArrayRef<const char *> Args,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ParseFrontendArgs(FrontendOpts, ParsedArgs, Diags)) {
|
||||
if (ParseFrontendArgs(FrontendOpts, ParsedArgs, Diags,
|
||||
ConfigurationFileBuffers)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user