aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGCXX.cpp2
-rw-r--r--lib/CodeGen/CGDecl.cpp5
2 files changed, 1 insertions, 6 deletions
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);