mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[lldb] Capture error messages from parseASTSection to log from the caller.
This helps fix a lldb console output mixup between the lldb logging and the llvm::dbgs() messages from parseASTSection.
This commit is contained in:
@@ -514,6 +514,28 @@ static bool validateInputBlock(
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string serialization::StatusToString(Status S) {
|
||||
switch (S) {
|
||||
case Status::Valid: return "Valid";
|
||||
case Status::FormatTooOld: return "FormatTooOld";
|
||||
case Status::FormatTooNew: return "FormatTooNew";
|
||||
case Status::RevisionIncompatible: return "RevisionIncompatible";
|
||||
case Status::NotInOSSA: return "NotInOSSA";
|
||||
case Status::MissingDependency: return "MissingDependency";
|
||||
case Status::MissingUnderlyingModule: return "MissingUnderlyingModule";
|
||||
case Status::CircularDependency: return "CircularDependency";
|
||||
case Status::FailedToLoadBridgingHeader: return "FailedToLoadBridgingHeader";
|
||||
case Status::Malformed: return "Malformed";
|
||||
case Status::MalformedDocumentation: return "MalformedDocumentation";
|
||||
case Status::NameMismatch: return "NameMismatch";
|
||||
case Status::TargetIncompatible: return "TargetIncompatible";
|
||||
case Status::TargetTooNew: return "TargetTooNew";
|
||||
case Status::SDKMismatch: return "SDKMismatch";
|
||||
default:
|
||||
llvm_unreachable("The switch should cover all cases");
|
||||
}
|
||||
}
|
||||
|
||||
bool serialization::isSerializedAST(StringRef data) {
|
||||
StringRef signatureStr(reinterpret_cast<const char *>(SWIFTMODULE_SIGNATURE),
|
||||
std::size(SWIFTMODULE_SIGNATURE));
|
||||
|
||||
Reference in New Issue
Block a user