summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-29 19:37:28 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-29 19:37:28 +0000
commit4bb87ce33e80efe4c01c7f94d9681bbeef5c92d9 (patch)
treee0e7bef03297962b09309334490ed7f5b1b04c8f /clang/lib/AST
parent3df87678694de01bb51851f3555629a869627c26 (diff)
downloadbcm5719-llvm-4bb87ce33e80efe4c01c7f94d9681bbeef5c92d9.tar.gz
bcm5719-llvm-4bb87ce33e80efe4c01c7f94d9681bbeef5c92d9.zip
Improve instantiation of UnresolvedUsingDecls.
llvm-svn: 80434
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