QualType T = D.getType();
if (T->isReferenceType()) {
- ErrorUnsupported(Init, "Global variable that binds to a reference");
+ ErrorUnsupported(Init, "global variable that binds to a reference");
} else if (!hasAggregateLLVMType(T)) {
llvm::Value *V = EmitScalarExpr(Init);
EmitStoreOfScalar(V, DeclPtr, T.isVolatileQualified(), T);
if (D.getType()->isVariablyModifiedType())
EmitVLASize(D.getType());
- if (D.getType()->isReferenceType()) {
- CGM.ErrorUnsupported(&D, "static declaration with reference type");
- return;
- }
-
if (D.getInit()) {
llvm::Constant *Init = CGM.EmitConstantExpr(D.getInit(), D.getType(), this);