mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Update error message on deserialization failure
This adds information about whether the module was built from source or from a swiftinterface, whether it's resilient or not, and tweaks the format.
This commit is contained in:
@@ -584,12 +584,17 @@ void ModuleFileSharedCore::fatal(llvm::Error error) const {
|
||||
}
|
||||
|
||||
void ModuleFileSharedCore::outputDiagnosticInfo(llvm::raw_ostream &os) const {
|
||||
os << "module '" << Name << "' with full misc version '" << MiscVersion
|
||||
<< "'";
|
||||
bool resilient = ResilienceStrategy(Bits.ResilienceStrategy) ==
|
||||
ResilienceStrategy::Resilient;
|
||||
os << "module '" << Name
|
||||
<< "', builder version '" << MiscVersion
|
||||
<< "', built from "
|
||||
<< (Bits.IsBuiltFromInterface? "swiftinterface": "source")
|
||||
<< ", " << (resilient? "resilient": "non-resilient");
|
||||
if (Bits.IsAllowModuleWithCompilerErrorsEnabled)
|
||||
os << " (built with -experimental-allow-module-with-compiler-errors)";
|
||||
os << ", built with -experimental-allow-module-with-compiler-errors";
|
||||
if (ModuleInputBuffer)
|
||||
os << " at '" << ModuleInputBuffer->getBufferIdentifier() << "'";
|
||||
os << ", loaded from '" << ModuleInputBuffer->getBufferIdentifier() << "'";
|
||||
}
|
||||
|
||||
ModuleFileSharedCore::~ModuleFileSharedCore() { }
|
||||
|
||||
Reference in New Issue
Block a user