aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-reduce/llvm-reduce.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2023-01-11 12:05:59 +0100
committerSam McCall <sam.mccall@gmail.com>2023-01-11 14:44:22 +0100
commitd7bba07526a7298c9331de031dec15daecff3503 (patch)
tree534ac56fb096eb7c24e113a9078120bcf0800821 /llvm/tools/llvm-reduce/llvm-reduce.cpp
parent60cdd12d7a0eba6e1d3b8a0eaa24f21f86876fd3 (diff)
downloadllvm-d7bba07526a7298c9331de031dec15daecff3503.zip
llvm-d7bba07526a7298c9331de031dec15daecff3503.tar.gz
llvm-d7bba07526a7298c9331de031dec15daecff3503.tar.bz2
[include-cleaner] Improve header spelling in the presence of links
HeaderSearch uses FileEntry::getName() to determine the best spelling of a header. FileEntry::getName() is now the name of the *last* retrieved ref. This means that when FileManager::getFile() hits an existing inode through a new path, it changes the spelling of that header. In the absence of explicit logic to track the preferred name(s) of header files, we should avoid gratuitously calling getFile() with paths different than how the header was originally included, such as the result of realpath(). The originally-specified path should be fine here: - if the same filemanager is being used for record/analysis, we'll hit the filename cache - if a different filemanager is being used e.g. preamble scenario, we should get the same result unless either the working directory has changed (which it shouldn't, else many other things will fail) or the file has gone/changed inode (in which case the old method doesn't work either) Needless to say this is fragile, but talking to @kadircet offline, it's good enough for our purposes for now. Differential Revision: https://reviews.llvm.org/D141478
Diffstat (limited to 'llvm/tools/llvm-reduce/llvm-reduce.cpp')
0 files changed, 0 insertions, 0 deletions