mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Print the path to a too-new, too-old, or malformed module file.
<rdar://problem/16680615> Swift SVN r16637
This commit is contained in:
@@ -720,7 +720,7 @@ ModuleFile::ModuleFile(
|
||||
llvm::BitstreamCursor docCursor{ModuleDocInputReader};
|
||||
if (!checkModuleDocSignature(docCursor) ||
|
||||
!enterTopLevelModuleBlock(docCursor, MODULE_DOC_BLOCK_ID)) {
|
||||
error();
|
||||
error(ModuleStatus::MalformedDocumentation);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ ModuleFile::ModuleFile(
|
||||
switch (topLevelEntry.ID) {
|
||||
case COMMENT_BLOCK_ID: {
|
||||
if (!hasValidControlBlock || !readCommentBlock(docCursor)) {
|
||||
error();
|
||||
error(ModuleStatus::MalformedDocumentation);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -739,7 +739,7 @@ ModuleFile::ModuleFile(
|
||||
// Unknown top-level block, possibly for use by a future version of the
|
||||
// module format.
|
||||
if (docCursor.SkipBlock()) {
|
||||
error();
|
||||
error(ModuleStatus::MalformedDocumentation);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -749,7 +749,7 @@ ModuleFile::ModuleFile(
|
||||
}
|
||||
|
||||
if (topLevelEntry.Kind != llvm::BitstreamEntry::EndBlock) {
|
||||
error();
|
||||
error(ModuleStatus::MalformedDocumentation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user