aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-30 17:58:55 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-30 17:58:55 +0000
commit20fbe7c4772d537c1f779b1ff89cbb57d1d9afff (patch)
tree3397a078405505083393d33587047acb8ed3f0ac /lib/CodeGen/CGExprAgg.cpp
parent67aba816901503d9cf7ba699525fa62cc7f8e5e4 (diff)
L-value to r-value conversion is not ready for prime-time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp42
1 files changed, 4 insertions, 38 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index bd1c43dff5..308520aadd 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -250,6 +250,8 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
}
switch (E->getCastKind()) {
+ default: assert(0 && "Unhandled cast kind!");
+
case CK_Dynamic: {
assert(isa<CXXDynamicCastExpr>(E) && "CK_Dynamic without a dynamic_cast?");
LValue LV = CGF.EmitCheckedLValue(E->getSubExpr());
@@ -284,7 +286,6 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
}
case CK_NoOp:
- case CK_LValueToRValue:
case CK_UserDefinedConversion:
case CK_ConstructorConversion:
assert(CGF.getContext().hasSameUnqualifiedType(E->getSubExpr()->getType(),
@@ -292,45 +293,10 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
"Implicit cast types must be compatible");
Visit(E->getSubExpr());
break;
-
+
case CK_LValueBitCast:
- llvm_unreachable("should not be emitting lvalue bitcast as rvalue");
+ llvm_unreachable("there are no lvalue bit-casts on aggregates");
break;
-
- case CK_Dependent:
- case CK_BitCast:
- case CK_ArrayToPointerDecay:
- case CK_FunctionToPointerDecay:
- case CK_NullToPointer:
- case CK_NullToMemberPointer:
- case CK_BaseToDerivedMemberPointer:
- case CK_DerivedToBaseMemberPointer:
- case CK_MemberPointerToBoolean:
- case CK_IntegralToPointer:
- case CK_PointerToIntegral:
- case CK_PointerToBoolean:
- case CK_ToVoid:
- case CK_VectorSplat:
- case CK_IntegralCast:
- case CK_IntegralToBoolean:
- case CK_IntegralToFloating:
- case CK_FloatingToIntegral:
- case CK_FloatingToBoolean:
- case CK_FloatingCast:
- case CK_AnyPointerToObjCPointerCast:
- case CK_AnyPointerToBlockPointerCast:
- case CK_ObjCObjectLValueCast:
- case CK_FloatingRealToComplex:
- case CK_FloatingComplexToReal:
- case CK_FloatingComplexToBoolean:
- case CK_FloatingComplexCast:
- case CK_FloatingComplexToIntegralComplex:
- case CK_IntegralRealToComplex:
- case CK_IntegralComplexToReal:
- case CK_IntegralComplexToBoolean:
- case CK_IntegralComplexCast:
- case CK_IntegralComplexToFloatingComplex:
- llvm_unreachable("cast kind invalid for aggregate types");
}
}