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));
// CHECK-NEXT: sub
// CHECK-NEXT: store i32 {{.*}}, i32* @_ZN5test1L1yE
+// PR9570: the indirect field shouldn't crash IR gen.
+namespace test5 {
+ union {
+ unsigned bar[4096] __attribute__((aligned(128)));
+ };
+}
+
// At the end of the file, we check that y is initialized before z.
// CHECK: define internal void @_GLOBAL__I_a() section "__TEXT,__StaticInit,regular,pure_instructions" {