summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-10-17 13:00:44 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-10-17 13:00:44 +0000
commita72a70aeb94c0b4cd4c5ef855cbc42da13fc0463 (patch)
treebdeb47f45e6dfb12342acd3efa88746fdde7b303 /clang/include
parentaa79b19a3e8ba5099f6fb5843e7e8cd3f44bd5ef (diff)
downloadbcm5719-llvm-a72a70aeb94c0b4cd4c5ef855cbc42da13fc0463.tar.gz
bcm5719-llvm-a72a70aeb94c0b4cd4c5ef855cbc42da13fc0463.zip
Revert "Reinstate r281429, reverted in r281452, with a fix for its mishandling of"
This reverts commit r284176. It still marks some modules as invisible that should be visible. Will follow up with the author with a test case. llvm-svn: 284382
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/AST/ASTContext.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index f5a9bd2da54..3d777524b83 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -308,18 +308,10 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// merged into.
llvm::DenseMap<Decl*, Decl*> MergedDecls;
- /// The modules into which a definition has been merged, or a map from a
- /// merged definition to its canonical definition. This is really a union of
- /// a NamedDecl* and a vector of Module*.
- struct MergedModulesOrCanonicalDef {
- llvm::TinyPtrVector<Module*> MergedModules;
- NamedDecl *CanonicalDef = nullptr;
- };
-
/// \brief A mapping from a defining declaration to a list of modules (other
/// than the owning module of the declaration) that contain merged
/// definitions of that entity.
- llvm::DenseMap<NamedDecl*, MergedModulesOrCanonicalDef> MergedDefModules;
+ llvm::DenseMap<NamedDecl*, llvm::TinyPtrVector<Module*>> MergedDefModules;
/// \brief Initializers for a module, in order. Each Decl will be either
/// something that has a semantic effect on startup (such as a variable with
@@ -891,7 +883,6 @@ public:
/// and should be visible whenever \p M is visible.
void mergeDefinitionIntoModule(NamedDecl *ND, Module *M,
bool NotifyListeners = true);
- void mergeDefinitionIntoModulesOf(NamedDecl *ND, NamedDecl *Other);
/// \brief Clean up the merged definition list. Call this if you might have
/// added duplicates into the list.
void deduplicateMergedDefinitonsFor(NamedDecl *ND);
@@ -902,9 +893,7 @@ public:
auto MergedIt = MergedDefModules.find(Def);
if (MergedIt == MergedDefModules.end())
return None;
- if (auto *CanonDef = MergedIt->second.CanonicalDef)
- return getModulesWithMergedDefinition(CanonDef);
- return MergedIt->second.MergedModules;
+ return MergedIt->second;
}
/// Add a declaration to the list of declarations that are initialized
OpenPOWER on IntegriCloud