[modules] When creating a declaration, cache its owning module immediately
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 12 May 2017 23:27:00 +0000 (23:27 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 12 May 2017 23:27:00 +0000 (23:27 +0000)
commitfc8c57cc5ba561e5d12794399d15aae35929b56d
tree8b6066fb88bd29ca847706857a674163385a196d
parent2a735421d1aace9d64c4ee7adc1f905974311db3
[modules] When creating a declaration, cache its owning module immediately
rather than waiting until it's queried.

Currently this is only applied to local submodule visibility mode, as we don't
yet allocate storage for the owning module in non-local-visibility modules
compilations.

llvm-svn: 302965
clang/include/clang/AST/Decl.h
clang/include/clang/AST/DeclBase.h
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTDumper.cpp
clang/lib/AST/Decl.cpp
clang/lib/AST/DeclBase.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaLookup.cpp