This is an archive of the discontinued LLVM Phabricator instance.

[Modules] Fix bug where header resolution in modules doesn't work when compiling with relative paths.
Needs ReviewPublic

Authored by akhuang on Aug 11 2021, 11:24 AM.

Details

Reviewers
rsmith
rnk
Summary

Currently when searching for header files (with relative paths) we concatenate
the path to the module map with the header filename. However when
searching for system headers it seems like we should start from the
current directory and not the path to the module map.

No test added because I'm not sure there's a way to use relative paths
to system headers in the lit tests.

Bug: https://bugs.llvm.org/show_bug.cgi?id=47209

Diff Detail

Event Timeline

akhuang requested review of this revision.Aug 11 2021, 11:24 AM
akhuang created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2021, 11:24 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
akhuang updated this revision to Diff 366153.Aug 12 2021, 5:24 PM

add case for include_nexts; I don't entirely understand this part of the code so not sure if it's what we want, but it seems to make building with -no-canonical-prefixes happier

akhuang updated this revision to Diff 366344.Aug 13 2021, 1:30 PM

undo previous change