mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Comment parsing: allow parsing comments with invalid source locations -- these
come from serialized modules Swift SVN r15104
This commit is contained in:
@@ -50,6 +50,12 @@ public:
|
||||
llvm::SMLoc::getFromPointer(Value.getPointer() + ByteOffset));
|
||||
}
|
||||
|
||||
SourceLoc getAdvancedLocOrInvalid(int ByteOffset) const {
|
||||
if (isValid())
|
||||
return getAdvancedLoc(ByteOffset);
|
||||
return SourceLoc();
|
||||
}
|
||||
|
||||
/// Print out the SourceLoc. If this location is in the same buffer
|
||||
/// as specified by \c LastBufferID, then we don't print the filename. If
|
||||
/// not, we do print the filename, and then update \c LastBufferID with the
|
||||
|
||||
Reference in New Issue
Block a user