diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-29 17:30:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-29 17:30:29 +0000 |
commit | 16e8be2ac532358d4e413fdfa2643b1876edda78 (patch) | |
tree | 71fd1e1de434dc9b565913b9f7345eac0343116d /lib/CodeGen/CodeGenModule.cpp | |
parent | 683087ffcf21d2a22cd2d0424b7f119168b47a8e (diff) |
Move FunctionDecl::TemplateSpecializationInfo out into its own class,
FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 0a531e9b21..a82324834b 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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; |