[modules] When creating a declaration, cache its owning module immediatelyrather than waiting until it's queried.Currently this is only applied to local submodule visibility mode, as we don'tyet
[modules] When creating a declaration, cache its owning module immediatelyrather than waiting until it's queried.Currently this is only applied to local submodule visibility mode, as we don'tyet allocate storage for the owning module in non-local-visibility modulescompilations.This reinstates r302965, reverted in r303037, with a fix for the reportedcrash, which occurred when reparenting a local declaration to be a child ofa hidden imported declaration (specifically during template instantiation).llvm-svn: 303224
show more ...
[modules] Before checking whether the controlling macro of a header is defined,update the identifier in case we've imported a definition of the macro (andthus the contents of the header) from a mod
[modules] Before checking whether the controlling macro of a header is defined,update the identifier in case we've imported a definition of the macro (andthus the contents of the header) from a module.Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longermakes sense to keep these separate now that the only user of the former alsoneeds the latter.llvm-svn: 241137
[modules] Make sure macros get made visible in the top-level file if we've gotlocal submodule visibility enabled; that top-level file might not actually bethe module includes buffer if use of prebu
[modules] Make sure macros get made visible in the top-level file if we've gotlocal submodule visibility enabled; that top-level file might not actually bethe module includes buffer if use of prebuilt modules is disabled.llvm-svn: 241120
[modules] If we re-enter a submodule from within itself (when submodulevisibility is enabled) or leave and re-enter it, restore the macro and modulevisibility state from last time we were in that s
[modules] If we re-enter a submodule from within itself (when submodulevisibility is enabled) or leave and re-enter it, restore the macro and modulevisibility state from last time we were in that submodule.This allows mutually-#including header files to stand a chance at beingmodularized with local visibility enabled.llvm-svn: 237871
[modules] Add local submodule visibility support for declarations.With this change, enabling -fmodules-local-submodule-visibility results in namevisibility rules being applied to submodules of the
[modules] Add local submodule visibility support for declarations.With this change, enabling -fmodules-local-submodule-visibility results in namevisibility rules being applied to submodules of the current module in additionto imported modules (that is, names no longer "leak" between submodules of thesame top-level module). This also makes it much safer to textually include anon-modular library into a module: each submodule that textually includes thatlibrary will get its own "copy" of that library, and so the library becomesvisible no matter which including submodule you import.llvm-svn: 237473