diff options
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/AST/ASTContext.h | 15 |
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 |