diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2018-12-04 16:30:45 +0000 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2018-12-04 16:30:45 +0000 |
commit | 660d233ea5a5e5fd17c3dfd84bbf0b0a0522cc04 (patch) | |
tree | 78c237bc6bce24d07d294d40470295f28178fb8d /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 449a7f0dbb621edf2a6351924a170e268ec6957d (diff) | |
download | bcm5719-llvm-660d233ea5a5e5fd17c3dfd84bbf0b0a0522cc04.tar.gz bcm5719-llvm-660d233ea5a5e5fd17c3dfd84bbf0b0a0522cc04.zip |
Revert "Avoid emitting redundant or unusable directories in DIFile metadata entries."
This reverts commit r348154 and follow-up commits r348211 and r3248213.
Reason: the original commit broke compiler-rt tests and a follow-up fix
(r348203) broke our integrate and was reverted.
llvm-svn: 348280
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index fd4506f2d19..1a2b0616dc7 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -549,16 +549,12 @@ const FullSourceLoc BackendConsumer::getBestLocationFromDebugLoc( SourceLocation DILoc; if (D.isLocationAvailable()) { - D.getLocation(Filename, Line, Column); - if (Line > 0) { - const FileEntry *FE = FileMgr.getFile(Filename); - if (!FE) - FE = FileMgr.getFile(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. - DILoc = SourceMgr.translateFileLineCol(FE, Line, Column ? Column : 1); - } + D.getLocation(&Filename, &Line, &Column); + const FileEntry *FE = FileMgr.getFile(Filename); + if (FE && Line > 0) { + // If -gcolumn-info was not used, Column will be 0. This upsets the + // source manager, so pass 1 if Column is not set. + DILoc = SourceMgr.translateFileLineCol(FE, Line, Column ? Column : 1); } BadDebugInfo = DILoc.isInvalid(); } |