From 28ad4b5da1c56d7aa10399f83699657d23498d66 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 26 May 2009 20:50:29 +0000 Subject: Make sure that CodeGen sees template instantiations. llvm-svn: 72433 --- clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp') diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index b9a9ae8c50a..90c86ec57e6 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 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, /*IsInstantiation=*/true); CurContext = PreviousContext; + + DeclGroupRef DG(Function); + Consumer.HandleTopLevelDecl(DG); } /// \brief Instantiate the definition of the given variable from its -- cgit v1.2.3