[clang] 2ccb074 - [clang] NFC, make more HeaderSearch methods const.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 1 06:09:07 PDT 2023
Author: Haojian Wu
Date: 2023-06-01T15:08:55+02:00
New Revision: 2ccb07452d8e1e62c545db2f6faad2bd794572be
URL: https://github.com/llvm/llvm-project/commit/2ccb07452d8e1e62c545db2f6faad2bd794572be
DIFF: https://github.com/llvm/llvm-project/commit/2ccb07452d8e1e62c545db2f6faad2bd794572be.diff
LOG: [clang] NFC, make more HeaderSearch methods const.
Added:
Modified:
clang/include/clang/Lex/HeaderSearch.h
clang/lib/Lex/HeaderSearch.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Lex/HeaderSearch.h b/clang/include/clang/Lex/HeaderSearch.h
index e2d7f64c360f..5386b7a5d6d6 100644
--- a/clang/include/clang/Lex/HeaderSearch.h
+++ b/clang/include/clang/Lex/HeaderSearch.h
@@ -553,10 +553,10 @@ class HeaderSearch {
/// macro.
///
/// This routine does not consider the effect of \#import
- bool isFileMultipleIncludeGuarded(const FileEntry *File);
+ bool isFileMultipleIncludeGuarded(const FileEntry *File) const;
/// Determine whether the given file is known to have ever been \#imported.
- bool hasFileBeenImported(const FileEntry *File) {
+ bool hasFileBeenImported(const FileEntry *File) const {
const HeaderFileInfo *FI = getExistingFileInfo(File);
return FI && FI->isImport;
}
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index 33b25928cc04..16d64be55842 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -1375,7 +1375,7 @@ HeaderSearch::getExistingFileInfo(const FileEntry *FE,
return HFI;
}
-bool HeaderSearch::isFileMultipleIncludeGuarded(const FileEntry *File) {
+bool HeaderSearch::isFileMultipleIncludeGuarded(const FileEntry *File) const {
// Check if we've entered this file and found an include guard or #pragma
// once. Note that we dor't check for #import, because that's not a property
// of the file itself.
More information about the cfe-commits
mailing list