diff --git a/clang/include/clang/CodeGen/ConstantInitBuilder.h b/clang/include/clang/CodeGen/ConstantInitBuilder.h index 3e183e6f85d0..a85fba3f3ede 100644 --- a/clang/include/clang/CodeGen/ConstantInitBuilder.h +++ b/clang/include/clang/CodeGen/ConstantInitBuilder.h @@ -485,8 +485,10 @@ class ConstantArrayBuilder : public ConstantArrayBuilderTemplateBase { template friend class ConstantInitBuilderTemplateBase; + + // The use of explicit qualification is a GCC workaround. template - friend class ConstantAggregateBuilderTemplateBase; + friend class CodeGen::ConstantAggregateBuilderTemplateBase; ConstantArrayBuilder(ConstantInitBuilder &builder, ConstantAggregateBuilderBase *parent, @@ -500,8 +502,10 @@ class ConstantStructBuilder : public ConstantStructBuilderTemplateBase { template friend class ConstantInitBuilderTemplateBase; + + // The use of explicit qualification is a GCC workaround. template - friend class ConstantAggregateBuilderTemplateBase; + friend class CodeGen::ConstantAggregateBuilderTemplateBase; ConstantStructBuilder(ConstantInitBuilder &builder, ConstantAggregateBuilderBase *parent,