[NFC] Mark SourceManager::getIDForBufferIdentifier const

This commit is contained in:
Robert Widmann
2020-09-11 13:54:39 -06:00
parent d9a13bc923
commit cedef16f54
2 changed files with 3 additions and 4 deletions

View File

@@ -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.
/// ///

View File

@@ -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;