Make sure that CodeGen sees template instantiations.

llvm-svn: 72433
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index b9a9ae8..90c86ec 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -10,6 +10,7 @@
 //
 //===----------------------------------------------------------------------===/
 #include "Sema.h"
+#include "clang/AST/ASTConsumer.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/DeclVisitor.h"
@@ -622,6 +623,9 @@
                           /*IsInstantiation=*/true);
 
   CurContext = PreviousContext;
+
+  DeclGroupRef DG(Function);
+  Consumer.HandleTopLevelDecl(DG);
 }
 
 /// \brief Instantiate the definition of the given variable from its