aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2024-09-25 10:36:44 -0700
committerGitHub <noreply@github.com>2024-09-25 10:36:44 -0700
commitb1aea98cfa357e23f4bb52232da5f41781f23bff (patch)
tree7fc6ae22d4317dfaafa1f01432265d566b89c67a /clang/lib/CodeGen/CodeGenAction.cpp
parentabe0dd195a3b2630afdc5c1c233eb2a068b2d72f (diff)
downloadllvm-b1aea98cfa357e23f4bb52232da5f41781f23bff.zip
llvm-b1aea98cfa357e23f4bb52232da5f41781f23bff.tar.gz
llvm-b1aea98cfa357e23f4bb52232da5f41781f23bff.tar.bz2
[clang] Make deprecations of some `FileManager` APIs formal (#110014)
Some `FileManager` APIs still return `{File,Directory}Entry` instead of the preferred `{File,Directory}EntryRef`. These are documented to be deprecated, but don't have the attribute that warns on their usage. This PR marks them as such with `LLVM_DEPRECATED()` and replaces their usage with the recommended counterparts. NFCI.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 883333f..c9f9b68 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -586,9 +586,9 @@ const FullSourceLoc BackendConsumer::getBestLocationFromDebugLoc(
if (D.isLocationAvailable()) {
D.getLocation(Filename, Line, Column);
if (Line > 0) {
- auto FE = FileMgr.getFile(Filename);
+ auto FE = FileMgr.getOptionalFileRef(Filename);
if (!FE)
- FE = FileMgr.getFile(D.getAbsolutePath());
+ FE = FileMgr.getOptionalFileRef(D.getAbsolutePath());
if (FE) {
// If -gcolumn-info was not used, Column will be 0. This upsets the
// source manager, so pass 1 if Column is not set.