aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2023-09-13 11:45:29 -0700
committerJan Svoboda <jan_svoboda@apple.com>2023-09-29 09:30:21 -0700
commit2da8f30c5e9a26cd3ca7f5aa8489eb0f0f3c8559 (patch)
tree9f6020b8e72e161ead2d021b85927d922db1e6e8 /clang/lib/Basic/SourceManager.cpp
parent1610311a95b1a98f47e9242d67141c5b3e44a138 (diff)
downloadllvm-2da8f30c5e9a26cd3ca7f5aa8489eb0f0f3c8559.zip
llvm-2da8f30c5e9a26cd3ca7f5aa8489eb0f0f3c8559.tar.gz
llvm-2da8f30c5e9a26cd3ca7f5aa8489eb0f0f3c8559.tar.bz2
[clang] NFCI: Use `FileEntryRef` in `SourceManager::overrideFileContents()`
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 75855ad..3ca5dcc 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -687,8 +687,8 @@ SourceManager::getMemoryBufferForFileOrNone(const FileEntry *File) {
}
void SourceManager::overrideFileContents(
- const FileEntry *SourceFile, std::unique_ptr<llvm::MemoryBuffer> Buffer) {
- SrcMgr::ContentCache &IR = getOrCreateContentCache(SourceFile->getLastRef());
+ FileEntryRef SourceFile, std::unique_ptr<llvm::MemoryBuffer> Buffer) {
+ SrcMgr::ContentCache &IR = getOrCreateContentCache(SourceFile);
IR.setBuffer(std::move(Buffer));
IR.BufferOverridden = true;