aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
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);