[PATCH] D131004: [clang] Add FileEntryRef::getNameAsRequested()

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 2 11:38:31 PDT 2022


benlangmuir created this revision.
benlangmuir added a reviewer: bnbarham.
Herald added a project: All.
benlangmuir requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

As progress towards having FileManager::getFileRef() return the path as-requested by default, return a FileEntryRef that can use getNameAsRequested() to retrieve this path, with the ultimate goal that this should be the behaviour of getName() and clients should explicitly request the "external" name if they need to (see comment in FileManager::getFileRef). For now, getName() continues to return the external path by looking through the redirects.

For now, the new function is only used in unit tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131004

Files:
  clang/include/clang/Basic/FileEntry.h
  clang/lib/Basic/FileManager.cpp
  clang/unittests/Basic/FileEntryTest.cpp
  clang/unittests/Basic/FileManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131004.449363.patch
Type: text/x-patch
Size: 7331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220802/69c56aac/attachment.bin>


More information about the cfe-commits mailing list