[clang] 8277a51 - [SourceManager] Avoid copying SLocEntry in computeMacroArgsCache
Jan Korous via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 22 14:18:41 PDT 2020
Author: Jan Korous
Date: 2020-10-22T14:18:28-07:00
New Revision: 8277a513c74b53e5ad7f482f76b27bc8609c66ae
URL: https://github.com/llvm/llvm-project/commit/8277a513c74b53e5ad7f482f76b27bc8609c66ae
DIFF: https://github.com/llvm/llvm-project/commit/8277a513c74b53e5ad7f482f76b27bc8609c66ae.diff
LOG: [SourceManager] Avoid copying SLocEntry in computeMacroArgsCache
Follow-up to e7870223d8b5
Differential Revision: https://reviews.llvm.org/D86230
Added:
Modified:
clang/lib/Basic/SourceManager.cpp
Removed:
################################################################################
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 3bffcb548ebb..db87a6e57741 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -1761,7 +1761,7 @@ void SourceManager::computeMacroArgsCache(MacroArgsMap &MacroArgsCache,
if (Invalid)
return;
if (Entry.isFile()) {
- auto File = Entry.getFile();
+ auto& File = Entry.getFile();
if (File.getFileCharacteristic() == C_User_ModuleMap ||
File.getFileCharacteristic() == C_System_ModuleMap)
continue;
More information about the cfe-commits
mailing list