This is an archive of the discontinued LLVM Phabricator instance.

Modules - fix exclude header with umbrella directory
ClosedPublic

Authored by jtsoftware on Mar 14 2014, 6:59 PM.

Details

Summary

This patch removes some code that seems to interfere with clang handling "exclude header" fields correctly. "exclude header" fields in the module map should always be relative to the module map, not the umbrella directory. This still needs a test case, which I'll get to next, if this seems correct. Tracing in the debugger shows that the exclude is handled correctly, and all clang "test" tests pass.

Diff Detail

Event Timeline

I'm hesitant to say this LGTM, since this code was clearly added deliberately, but I'm having a hard time understanding why we'd want strange (and subtly-broken) rules for umbrella directories. Why is the model not simply that they implicitly generate a bunch of submodules?

Also, this patch should have an accompanying testcase showing that it fixes the behavior of exclude header when combined with umbrella headers.

I chatted with Doug and we agreed this looks good to remove.

You'll need to fix this test, probably by just removing the exclude header "y/b.h", which looks wrong:
FAIL: Clang :: Modules/exclude-header.c (3575 of 7161)

alexr accepted this revision.Apr 29 2014, 4:30 PM
alexr added a reviewer: alexr.
alexr added a subscriber: alexr.

This was r206342.

This revision is now accepted and ready to land.Apr 29 2014, 4:30 PM
alexr closed this revision.Apr 29 2014, 4:30 PM