When we load the first module, make sure that we wire up the ASTConsumer to the newly-created ASTReader. This makes sure that CodeGen sees the declarations it is interested in

llvm-svn: 139824
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 9087ab5..07d438b 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -756,6 +756,8 @@
     getASTContext().setExternalSource(Source);
     if (hasSema())
       ModuleManager->InitializeSema(getSema());
+    if (hasASTConsumer())
+      ModuleManager->StartTranslationUnit(&getASTConsumer());
   }
   
   // Try to load the module we found.