diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-23 01:04:34 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-23 01:04:34 +0000 |
commit | 90dc5254725e32c0fab65213c554b689a2a0bbbf (patch) | |
tree | 452b7be65de79b92808d06c7bcafa987de4ac112 /clang/lib/AST/ASTContext.cpp | |
parent | 8202e86a99fb6816b7874eb05df2f9bbca15b878 (diff) | |
download | bcm5719-llvm-90dc5254725e32c0fab65213c554b689a2a0bbbf.tar.gz bcm5719-llvm-90dc5254725e32c0fab65213c554b689a2a0bbbf.zip |
PR33552: Distinguish between declarations that are owned by no module and
declarations that are owned but unconditionally visible.
This allows us to set declarations as visible even if they have a local owning
module, without losing information. In turn, that means that our Objective-C
support can keep on incorrectly assuming the "hidden" bit on the declaration is
the whole story with regard to name visibility. This will also be useful once
we support the C++ Modules TS export semantics.
Objective-C name visibility is still incorrect in any case where the "hidden"
bit is not the complete story: for instance, in Objective-C++ the set of
visible categories will be wrong during template instantiation, and with local
submodule visibility enabled it will be wrong when building modules. Fixing that
will require a major overhaul of how visibility is handled for Objective-C (and
particularly for categories).
llvm-svn: 306075
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 69767e068cb..fabfdc9ef7e 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -894,7 +894,7 @@ void ASTContext::mergeDefinitionIntoModule(NamedDecl *ND, Module *M, if (getLangOpts().ModulesLocalVisibility) MergedDefModules[ND].push_back(M); else - ND->setHidden(false); + ND->setVisibleDespiteOwningModule(); } void ASTContext::deduplicateMergedDefinitonsFor(NamedDecl *ND) { |