From: Anders Carlsson Date: Mon, 17 Aug 2009 18:24:57 +0000 (+0000) Subject: Remove an ErrorUnsupported call. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=622f9dc76bdc4f4d6920907f4fb64a3222aa6566;p=clang Remove an ErrorUnsupported call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79261 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 5e71064797..61ff4807b2 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -74,7 +74,7 @@ void CodeGenFunction::EmitCXXGlobalVarDeclInit(const VarDecl &D, 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); diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index cadd964950..05823cf03f 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/lib/CodeGen/CGDecl.cpp @@ -126,11 +126,6 @@ void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D) { 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);