From Vassil Vassilev:
* Add default implementations (no-op) for ExternalASTSource's pure virtual functions. There are valid use cases that can live with these defaults.
* Move ExternalASTSource's out of line implementations into separate source file.
* Whitespace, forward decl, #include cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126648 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ExternalASTSource.cpp b/lib/AST/ExternalASTSource.cpp
new file mode 100644
index 0000000..89bf56d
--- /dev/null
+++ b/lib/AST/ExternalASTSource.cpp
@@ -0,0 +1,59 @@
+//===- ExternalASTSource.cpp - Abstract External AST Interface --*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+//  This file provides the default implementation of the ExternalASTSource 
+//  interface, which enables construction of AST nodes from some external
+//  source.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/AST/ExternalASTSource.h"
+#include "clang/AST/DeclarationName.h"
+
+using namespace clang;
+
+ExternalASTSource::~ExternalASTSource() { }
+
+void ExternalASTSource::PrintStats() { }
+
+Decl *ExternalASTSource::GetExternalDecl(uint32_t ID) {
+  return 0;
+}
+
+Selector ExternalASTSource::GetExternalSelector(uint32_t ID) {
+  return Selector();
+}
+
+uint32_t ExternalASTSource::GetNumExternalSelectors() {
+   return 0;
+}
+
+Stmt *ExternalASTSource::GetExternalDeclStmt(uint64_t Offset) {
+  return 0;
+}
+
+CXXBaseSpecifier *
+ExternalASTSource::GetExternalCXXBaseSpecifiers(uint64_t Offset) {
+  return 0;
+}
+
+DeclContextLookupResult 
+ExternalASTSource::FindExternalVisibleDeclsByName(const DeclContext *DC,
+                                                  DeclarationName Name) {
+  return DeclContext::lookup_result();
+}
+
+void ExternalASTSource::MaterializeVisibleDecls(const DeclContext *DC) { }
+
+bool 
+ExternalASTSource::FindExternalLexicalDecls(const DeclContext *DC,
+                                            bool (*isKindWeWant)(Decl::Kind),
+                                         llvm::SmallVectorImpl<Decl*> &Result) {
+  return true;
+}