This is an archive of the discontinued LLVM Phabricator instance.

[clang] Report the on-disk paths for inputs to module compiles
ClosedPublic

Authored by jansvoboda11 on Jan 12 2023, 4:46 PM.

Details

Summary

Since D135636, PCM files contain the "as requested" path of input files. The machinery for generating dependency files reports those paths as they appeared in the PCM file, which may confuse consumers that are not aware of VFS overlays that might've been in place at compile-time.

This patch makes sure the "use-external-name" setting is being respected when generating dependency files in modular builds by piping the paths serialized in PCMs through FileEntryRef::getName() before putting them into dependency files.

rdar://103459532

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jan 12 2023, 4:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 4:46 PM
Herald added a subscriber: ributzka. · View Herald Transcript
jansvoboda11 requested review of this revision.Jan 12 2023, 4:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 4:46 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jansvoboda11 edited the summary of this revision. (Show Details)Jan 12 2023, 4:54 PM
benlangmuir accepted this revision.Jan 13 2023, 9:54 AM

Please add a comment to each place you're doing this since it's non-obvious why the filename would be different to people not familiar with the mapping code. Otherwise LGTM

This revision is now accepted and ready to land.Jan 13 2023, 9:54 AM

Fix test on Windows(?), add comment

This revision was landed with ongoing or failed builds.Jan 13 2023, 6:38 PM
This revision was automatically updated to reflect the committed changes.