[cfe-commits] r79261 - in /cfe/trunk/lib/CodeGen: CGCXX.cpp CGDecl.cpp

Anders Carlsson andersca at mac.com
Mon Aug 17 11:24:57 PDT 2009


Author: andersca
Date: Mon Aug 17 13:24:57 2009
New Revision: 79261

URL: http://llvm.org/viewvc/llvm-project?rev=79261&view=rev
Log:
Remove an ErrorUnsupported call.

Modified:
    cfe/trunk/lib/CodeGen/CGCXX.cpp
    cfe/trunk/lib/CodeGen/CGDecl.cpp

Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=79261&r1=79260&r2=79261&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Mon Aug 17 13:24:57 2009
@@ -74,7 +74,7 @@
   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);

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=79261&r1=79260&r2=79261&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Mon Aug 17 13:24:57 2009
@@ -126,11 +126,6 @@
   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);
 





More information about the cfe-commits mailing list