[all-commits] [llvm/llvm-project] b67263: [clang][deps] Ensure deterministic filename case
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Fri Apr 8 00:18:36 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b672638dbc7cec9a51826520e8f8aef276bac3ee
https://github.com/llvm/llvm-project/commit/b672638dbc7cec9a51826520e8f8aef276bac3ee
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2022-04-08 (Fri, 08 Apr 2022)
Changed paths:
M clang/include/clang/Lex/DirectoryLookup.h
M clang/lib/Lex/HeaderSearch.cpp
A clang/test/ClangScanDeps/header-search-case-sensitivity.c
Log Message:
-----------
[clang][deps] Ensure deterministic filename case
The dependency scanner can reuse single FileManager instance across multiple translation units. This may lead to non-deterministic output depending on which TU gets processed first.
One of the problems is that Clang uses DirectoryEntry::getName in the header search algorithm. This function returns the path that was first used to construct the (shared) entry in FileManager. Using DirectoryEntryRef::getName instead preserves the case as it was spelled out for the current "get directory entry" request.
rdar://90647508
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D123229
More information about the All-commits
mailing list