summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-06-29 17:30:29 +0000
committerDouglas Gregor <dgregor@apple.com>2009-06-29 17:30:29 +0000
commit70d83e27a42d6498e2c30d38762710ae803bf7ae (patch)
tree564e053d09b8038b178cd129b68244127e9d17be /clang/lib/CodeGen/CodeGenModule.cpp
parent125758143850e11a528102aac4bdc8f4a5930d73 (diff)
downloadbcm5719-llvm-70d83e27a42d6498e2c30d38762710ae803bf7ae.tar.gz
bcm5719-llvm-70d83e27a42d6498e2c30d38762710ae803bf7ae.zip
Move FunctionDecl::TemplateSpecializationInfo out into its own class,
FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change. llvm-svn: 74431
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 0a531e9b21a..a82324834b8 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<FunctionDecl>(D)->getDescribedFunctionTemplate())
+ return;
+
+ // Fall through
+
case Decl::Var:
EmitGlobal(GlobalDecl(cast<ValueDecl>(D)));
break;
OpenPOWER on IntegriCloud