]> granicus.if.org Git - clang/commit
[modules] Add -fmodules-local-submodule-visibility flag.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 1 May 2015 21:22:17 +0000 (21:22 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 1 May 2015 21:22:17 +0000 (21:22 +0000)
commitc9e137359d69ba06ab347da130bbc5046452cb69
tree0ec7829ffc2d7772b720f2085142cdbd681d7fc5
parent8189e1138317c86d9648594b32a7a747358bb6bf
[modules] Add -fmodules-local-submodule-visibility flag.

This flag specifies that the normal visibility rules should be used even for
local submodules (submodules of the currently-being-built module). Thus names
will only be visible if a header / module that declares them has actually been
included / imported, and not merely because a submodule that happened to be
built earlier declared those names. This also removes the need to modularize
bottom-up: textually-included headers will be included into every submodule
that includes them, since their include guards will not leak between modules.

So far, this only governs visibility of macros, not of declarations, so is not
ready for real use yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236350 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/LangOptions.def
include/clang/Basic/Module.h
include/clang/Driver/CC1Options.td
include/clang/Lex/Preprocessor.h
lib/Frontend/CompilerInvocation.cpp
lib/Lex/PPLexerChange.cpp
lib/Serialization/ASTWriter.cpp
test/Modules/macro-ambiguity.cpp
test/Modules/macro-reexport.cpp
test/Modules/macros.c
test/Modules/macros2.c