summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-04-12 01:01:22 +0000
committerJohn McCall <rjmccall@apple.com>2011-04-12 01:01:22 +0000
commit32f44bd0fcf93d99dd0010bd7724c6520b716db2 (patch)
tree9d6caba9208fe64fa11607a0599c26692fe26c6c /clang/lib/CodeGen/CodeGenModule.cpp
parentf31fac471254c114fb7f756be474ac7eadffd236 (diff)
downloadbcm5719-llvm-32f44bd0fcf93d99dd0010bd7724c6520b716db2.tar.gz
bcm5719-llvm-32f44bd0fcf93d99dd0010bd7724c6520b716db2.zip
Ignore indirect field declarations. Fixes PR9570.
llvm-svn: 129337
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 944b24cbd38..d22991db041 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2034,6 +2034,11 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
EmitGlobal(cast<VarDecl>(D));
break;
+ // Indirect fields from global anonymous structs and unions can be
+ // ignored; only the actual variable requires IR gen support.
+ case Decl::IndirectField:
+ break;
+
// C++ Decls
case Decl::Namespace:
EmitNamespace(cast<NamespaceDecl>(D));
OpenPOWER on IntegriCloud