diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2023-09-06 13:20:46 -0700 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2023-09-06 13:23:23 -0700 |
commit | 0a9611fd8d8867ec5f2ad4612f7b9cc7e534efe3 (patch) | |
tree | 262e0661e9067b0607113c77f929014c35582f0d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 8d933ea5ac12cf706ebf818e8720f34660c79797 (diff) | |
download | llvm-0a9611fd8d8867ec5f2ad4612f7b9cc7e534efe3.zip llvm-0a9611fd8d8867ec5f2ad4612f7b9cc7e534efe3.tar.gz llvm-0a9611fd8d8867ec5f2ad4612f7b9cc7e534efe3.tar.bz2 |
Revert "[clang] NFCI: Adopt `SourceManager::getFileEntryRefForID()`"
This reverts commit ddbcc10b9e26b18f6a70e23d0611b9da75ffa52f.
The 'clang-tidy/checkers/misc/header-include-cycle.cpp' test started failing on Windows: https://lab.llvm.org/buildbot/#/builders/216/builds/26855.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 95f185f..f5513217 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3215,7 +3215,7 @@ bool CodeGenModule::isInNoSanitizeList(SanitizerMask Kind, llvm::Function *Fn, return true; // NoSanitize by location. Check "mainfile" prefix. auto &SM = Context.getSourceManager(); - FileEntryRef MainFile = *SM.getFileEntryRefForID(SM.getMainFileID()); + const FileEntry &MainFile = *SM.getFileEntryForID(SM.getMainFileID()); if (NoSanitizeL.containsMainFile(Kind, MainFile.getName())) return true; @@ -3236,7 +3236,7 @@ bool CodeGenModule::isInNoSanitizeList(SanitizerMask Kind, return true; auto &SM = Context.getSourceManager(); if (NoSanitizeL.containsMainFile( - Kind, SM.getFileEntryRefForID(SM.getMainFileID())->getName(), Category)) + Kind, SM.getFileEntryForID(SM.getMainFileID())->getName(), Category)) return true; if (NoSanitizeL.containsLocation(Kind, Loc, Category)) return true; @@ -3302,7 +3302,7 @@ CodeGenModule::isFunctionBlockedByProfileList(llvm::Function *Fn, // If location is unknown, this may be a compiler-generated function. Assume // it's located in the main file. auto &SM = Context.getSourceManager(); - if (auto MainFile = SM.getFileEntryRefForID(SM.getMainFileID())) + if (const auto *MainFile = SM.getFileEntryForID(SM.getMainFileID())) if (auto V = ProfileList.isFileExcluded(MainFile->getName(), Kind)) return *V; return ProfileList.getDefault(Kind); |