SourceManager: Return non-const references in getOrCreateContentCache and related...
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 23 Oct 2020 19:14:51 +0000 (15:14 -0400)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 26 Oct 2020 18:07:46 +0000 (14:07 -0400)
commit0387015d7549fc2c0cc8c45d3e78114cc4fd153f
treef15b558609962e45d08b6b90217a8c241e36a9df
parent89485efc2672f79d0acc0644830d0b9975068199
SourceManager: Return non-const references in getOrCreateContentCache and related, NFC

Update a few APIs to return non-const references instead of pointers,
and remove associated `const_cast`s and non-null assertions.

Differential Revision: https://reviews.llvm.org/D90067
clang/include/clang/Basic/SourceManager.h
clang/lib/Basic/SourceManager.cpp
clang/lib/Serialization/ASTReader.cpp