mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Mark SourceManager::getIDForBufferIdentifier const
This commit is contained in:
@@ -169,7 +169,7 @@ public:
|
|||||||
|
|
||||||
/// Returns a buffer ID for a previously added buffer with the given
|
/// Returns a buffer ID for a previously added buffer with the given
|
||||||
/// buffer identifier, or None if there is no such buffer.
|
/// buffer identifier, or None if there is no such buffer.
|
||||||
Optional<unsigned> getIDForBufferIdentifier(StringRef BufIdentifier);
|
Optional<unsigned> getIDForBufferIdentifier(StringRef BufIdentifier) const;
|
||||||
|
|
||||||
/// Returns the identifier for the buffer with the given ID.
|
/// Returns the identifier for the buffer with the given ID.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -152,9 +152,8 @@ SourceManager::getVirtualFile(SourceLoc Loc) const {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Optional<unsigned>
|
||||||
Optional<unsigned> SourceManager::getIDForBufferIdentifier(
|
SourceManager::getIDForBufferIdentifier(StringRef BufIdentifier) const {
|
||||||
StringRef BufIdentifier) {
|
|
||||||
auto It = BufIdentIDMap.find(BufIdentifier);
|
auto It = BufIdentIDMap.find(BufIdentifier);
|
||||||
if (It == BufIdentIDMap.end())
|
if (It == BufIdentIDMap.end())
|
||||||
return None;
|
return None;
|
||||||
|
|||||||
Reference in New Issue
Block a user