HomePhabricator

Tweak search path for API notes for private top-level modules

Authored by jordan_rose on Apr 20 2018, 8:44 AM.

Description

Tweak search path for API notes for private top-level modules

This is most important for frameworks: we want to look for
PrivateHeaders/Bar.apinotes rather than Headers/Bar.apinotes and
PrivateHeaders/Bar_private.apinotes. (This is especially important
because 'Bar' is probably actually something like 'FooKit_Private' in
practice.)

Note that the naming convention of 'FooKit_Private' for a private
top-level module may cause certain API notes files to be loaded twice
on case-insensitive filesystems: once as the regular API notes for
'FooKit_Private', and once as the /private/ API notes for 'FooKit'.
However, this shouldn't be a problem in practice (other than a bit of
extra I/O) because (1) most declarations will only show up in one of
the two modules anyway, being ignored in the other, and (2) the API
notes we have are /mostly/ idempotent (except for how they record
replacements).

(There is a Name field in an API notes file, but it's not currently
validated.)

rdar://problem/39417625

apple-llvm-split-commit: 889037b5e7e983e50db047b675940f1f9968cc4c
apple-llvm-split-dir: clang/

Details

Committed
jordan_roseApr 20 2018, 11:05 AM
Parents
rGe843a3fcae9e: Tweak Module to reduce merge conflicts with upstream LLVM Clang
Branches
Unknown
Tags
Unknown