Skip to content

Commit

Permalink
[clang] NFC, make more HeaderSearch methods const.
Browse files Browse the repository at this point in the history
  • Loading branch information
hokein committed Jun 1, 2023
1 parent 559d47a commit 2ccb074
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clang/include/clang/Lex/HeaderSearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Lex/HeaderSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2ccb074

Please sign in to comment.