Skip to content

Commit 225fc26

Browse files
authored
Merge pull request #42196 from xymus/deser-print-ext-module
[Serialization] Always print the `name` associated to an `XRefError`
2 parents e9be0a2 + fb84412 commit 225fc26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Serialization/Deserialization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ ModuleFile::resolveCrossReference(ModuleID MID, uint32_t pathLen) {
18911891
XRefExtensionPathPieceLayout::readRecord(scratch, ownerID, rawGenericSig);
18921892
M = getModule(ownerID);
18931893
if (!M) {
1894-
return llvm::make_error<XRefError>("module is not loaded",
1894+
return llvm::make_error<XRefError>("module with extension is not loaded",
18951895
pathTrace, getIdentifier(ownerID));
18961896
}
18971897
pathTrace.addExtension(M);

lib/Serialization/DeserializationErrors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class XRefError : public llvm::ErrorInfo<XRefError, DeclDeserializationError> {
282282
}
283283

284284
void log(raw_ostream &OS) const override {
285-
OS << message << "\n";
285+
OS << message << " (" << name << ")\n";
286286
path.print(OS);
287287

288288
if (!notes.empty()) {

0 commit comments

Comments
 (0)