Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76274 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 8ff80af..4927189 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -781,16 +781,16 @@
     return false;
 
   if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(Other))
-    return Ctx.getCanonicalDecl(Record->getInstantiatedFromMemberClass())
-             == Ctx.getCanonicalDecl(D);
+    return Record->getInstantiatedFromMemberClass()->getCanonicalDecl()
+             == D->getCanonicalDecl();
 
   if (FunctionDecl *Function = dyn_cast<FunctionDecl>(Other))
-    return Ctx.getCanonicalDecl(Function->getInstantiatedFromMemberFunction())
-             == Ctx.getCanonicalDecl(D);
+    return Function->getInstantiatedFromMemberFunction()->getCanonicalDecl()
+             == D->getCanonicalDecl();
 
   if (EnumDecl *Enum = dyn_cast<EnumDecl>(Other))
-    return Ctx.getCanonicalDecl(Enum->getInstantiatedFromMemberEnum())
-             == Ctx.getCanonicalDecl(D);
+    return Enum->getInstantiatedFromMemberEnum()->getCanonicalDecl()
+             == D->getCanonicalDecl();
 
   // FIXME: How can we find instantiations of anonymous unions?
 
@@ -891,8 +891,8 @@
            DC = DC->getParent()) {
         if (ClassTemplateSpecializationDecl *Spec 
               = dyn_cast<ClassTemplateSpecializationDecl>(DC))
-          if (Context.getCanonicalDecl(Spec->getSpecializedTemplate())
-              == Context.getCanonicalDecl(ClassTemplate))
+          if (Spec->getSpecializedTemplate()->getCanonicalDecl()
+              == ClassTemplate->getCanonicalDecl())
             return Spec;
       }