From 70d83e27a42d6498e2c30d38762710ae803bf7ae Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 29 Jun 2009 17:30:29 +0000 Subject: Move FunctionDecl::TemplateSpecializationInfo out into its own class, FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change. llvm-svn: 74431 --- clang/lib/CodeGen/CodeGenModule.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 0a531e9b21a6..a82324834b8d 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1477,9 +1477,19 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { if (Diags.hasErrorOccurred()) return; + // Ignore dependent declarations. + if (D->getDeclContext() && D->getDeclContext()->isDependentContext()) + return; + switch (D->getKind()) { case Decl::CXXMethod: case Decl::Function: + // Skip function templates + if (cast(D)->getDescribedFunctionTemplate()) + return; + + // Fall through + case Decl::Var: EmitGlobal(GlobalDecl(cast(D))); break; -- cgit v1.2.3