]> granicus.if.org Git - clang/commitdiff
Remove an ErrorUnsupported call.
authorAnders Carlsson <andersca@mac.com>
Mon, 17 Aug 2009 18:24:57 +0000 (18:24 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 17 Aug 2009 18:24:57 +0000 (18:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79261 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCXX.cpp
lib/CodeGen/CGDecl.cpp

index 5e71064797a3b861902793b3a6b238a0044434ce..61ff4807b2b4e859544d7133a3b1b6b9f9b07de6 100644 (file)
@@ -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);
index cadd964950cdea2bba39a8c9aa01f744ac2eec99..05823cf03f15e47aac555f525aa9c642c49aa722 100644 (file)
@@ -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);