llvm-project/clang/lib/Basic
Alex Lorenz 06abd69695 NFCI: Simplify SourceManager::translateFile by removing code path that should never be taken
I noticed that SourceManager::translateFile has code that doesn't really make sense.
In particular, if it fails to find a FileID by comparing FileEntry * values, it tries to
look through files that have the same filename, to see if they have a matching inode to try to
find the right FileID. However, the inode comparison seem redundant, as Clang's FileManager
already deduplicates FileEntry * values by inode.
Thus the comparisons between inodes should never actually succeed, and the comparison between FileEntry * values should be sufficient here.

Differential Revision: https://reviews.llvm.org/D65481

llvm-svn: 369585
2019-08-21 21:37:09 +00:00
..
Targets Reland "[ARM] push LR before __gnu_mcount_nc" 2019-08-16 23:30:16 +00:00
Attributes.cpp Introduce the _Clang scoped attribute token. 2018-11-09 17:19:45 +00:00
Builtins.cpp [OpenCL] Support pipe keyword in C++ mode 2019-05-22 13:12:20 +00:00
CMakeLists.txt Move LangStandard*, InputKind::Language to Basic 2019-08-05 13:59:26 +00:00
CharInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeGenOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Cuda.cpp [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012 2019-07-11 17:50:09 +00:00
Diagnostic.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
DiagnosticIDs.cpp Use a unique_ptr instead of manual memory management for CustomDiagInfo 2019-07-15 17:20:34 +00:00
DiagnosticOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileManager.cpp clang: Fix typo in comment 2019-08-21 15:37:27 +00:00
FileSystemStatCache.cpp [FileSystemStatCache] Return std::error_code from stat cache methods 2019-04-16 17:34:26 +00:00
FixedPoint.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
IdentifierTable.cpp [Sema][ObjC] Fix a -Wformat false positive with localizedStringForKey 2019-08-14 16:57:11 +00:00
LangOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LangStandards.cpp Move LangStandard*, InputKind::Language to Basic 2019-08-05 13:59:26 +00:00
Module.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
ObjCRuntime.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OpenMPKinds.cpp [OPENMP]Initial support for 'allocate' clause. 2019-03-27 14:14:31 +00:00
OperatorPrecedence.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SanitizerBlacklist.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SanitizerSpecialCaseList.cpp [Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC. 2019-03-01 10:05:15 +00:00
Sanitizers.cpp Tweak r355278 for compatibility with gcc 6 and earlier. 2019-03-02 21:55:36 +00:00
SourceLocation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SourceManager.cpp NFCI: Simplify SourceManager::translateFile by removing code path that should never be taken 2019-08-21 21:37:09 +00:00
TargetInfo.cpp Add SVE opaque built-in types 2019-08-09 08:52:54 +00:00
Targets.cpp [RISCV] Add FreeBSD targets 2019-08-01 13:14:30 +00:00
Targets.h De-templatize non-dependent VS macro logic, NFC 2019-07-09 20:57:28 +00:00
TokenKinds.cpp Use switch instead of series of comparisons 2019-08-03 16:32:49 +00:00
Version.cpp This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784. 2019-07-13 06:27:35 +00:00
Warnings.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRayInstr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRayLists.cpp Fix file headers. NFC 2019-03-01 06:49:51 +00:00