Eliminate the ASTContext parameter from RecordDecl::getDefinition()
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 7912a93..982ca7f 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -1097,7 +1097,7 @@
 /// specified record (struct/union/class), which indicates its size and field
 /// position information.
 const ASTRecordLayout &ASTContext::getASTRecordLayout(const RecordDecl *D) {
-  D = D->getDefinition(*this);
+  D = D->getDefinition();
   assert(D && "Cannot get layout of forward declarations!");
 
   // Look up this layout, if already laid out, return what we have.
@@ -1114,7 +1114,7 @@
 }
 
 const CXXMethodDecl *ASTContext::getKeyFunction(const CXXRecordDecl *RD) {
-  RD = cast<CXXRecordDecl>(RD->getDefinition(*this));
+  RD = cast<CXXRecordDecl>(RD->getDefinition());
   assert(RD && "Cannot get key function for forward declarations!");
   
   const CXXMethodDecl *&Entry = KeyFunctions[RD];
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp
index f321ce2..710a463 100644
--- a/lib/AST/ASTImporter.cpp
+++ b/lib/AST/ASTImporter.cpp
@@ -652,7 +652,7 @@
   // If this record has a definition in the translation unit we're coming from,
   // but this particular declaration is not that definition, import the
   // definition and map to that.
-  TagDecl *Definition = D->getDefinition(Importer.getFromContext());
+  TagDecl *Definition = D->getDefinition();
   if (Definition && Definition != D) {
     Decl *ImportedDef = Importer.Import(Definition);
     Importer.getImportedDecls()[D] = ImportedDef;
diff --git a/lib/AST/CXXInheritance.cpp b/lib/AST/CXXInheritance.cpp
index 7d9e553..99f908c 100644
--- a/lib/AST/CXXInheritance.cpp
+++ b/lib/AST/CXXInheritance.cpp
@@ -102,7 +102,6 @@
 bool CXXRecordDecl::forallBases(ForallBasesCallback *BaseMatches,
                                 void *OpaqueData,
                                 bool AllowShortCircuit) const {
-  ASTContext &Context = getASTContext();
   llvm::SmallVector<const CXXRecordDecl*, 8> Queue;
 
   const CXXRecordDecl *Record = this;
@@ -118,7 +117,7 @@
       }
 
       CXXRecordDecl *Base = 
-            cast_or_null<CXXRecordDecl>(Ty->getDecl()->getDefinition(Context));
+            cast_or_null<CXXRecordDecl>(Ty->getDecl()->getDefinition());
       if (!Base) {
         if (AllowShortCircuit) return false;
         AllMatches = false;
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index a23f28c..80c1244 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -1398,7 +1398,7 @@
   }
 }
 
-TagDecl* TagDecl::getDefinition(ASTContext& C) const {
+TagDecl* TagDecl::getDefinition() const {
   if (isDefinition())
     return const_cast<TagDecl *>(this);