summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTContext.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index f5276576263..eebb11da998 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -242,6 +242,24 @@ ASTContext::setInstantiatedFromStaticDataMember(VarDecl *Inst, VarDecl *Tmpl) {
InstantiatedFromStaticDataMember[Inst] = Tmpl;
}
+UnresolvedUsingDecl *
+ASTContext::getInstantiatedFromUnresolvedUsingDecl(UsingDecl *UUD) {
+ llvm::DenseMap<UsingDecl *, UnresolvedUsingDecl *>::iterator Pos
+ = InstantiatedFromUnresolvedUsingDecl.find(UUD);
+ if (Pos == InstantiatedFromUnresolvedUsingDecl.end())
+ return 0;
+
+ return Pos->second;
+}
+
+void
+ASTContext::setInstantiatedFromUnresolvedUsingDecl(UsingDecl *UD,
+ UnresolvedUsingDecl *UUD) {
+ assert(!InstantiatedFromUnresolvedUsingDecl[UD] &&
+ "Already noted what using decl what instantiated from");
+ InstantiatedFromUnresolvedUsingDecl[UD] = UUD;
+}
+
namespace {
class BeforeInTranslationUnit
: std::binary_function<SourceRange, SourceRange, bool> {
OpenPOWER on IntegriCloud