From daa8e4e888758d55a7a759dd4a91b83921cef222 Mon Sep 17 00:00:00 2001 From: John McCall Date: Mon, 15 Nov 2010 09:13:47 +0000 Subject: Assorted work leading towards the elimination of CK_Unknown. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 3356cf46fb..ac40f3d580 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1783,7 +1783,10 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { switch (E->getCastKind()) { case CK_ToVoid: return EmitUnsupportedLValue(E, "unexpected cast lvalue"); - + + case CK_Dependent: + llvm_unreachable("dependent cast kind in IR gen!"); + case CK_NoOp: if (E->getSubExpr()->Classify(getContext()).getKind() != Expr::Classification::CL_PRValue) { @@ -1800,7 +1803,7 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { return LV; } // Fall through to synthesize a temporary. - + case CK_Unknown: case CK_BitCast: case CK_ArrayToPointerDecay: @@ -1809,10 +1812,13 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { case CK_NullToPointer: case CK_IntegralToPointer: case CK_PointerToIntegral: + case CK_PointerToBoolean: case CK_VectorSplat: case CK_IntegralCast: + case CK_IntegralToBoolean: case CK_IntegralToFloating: case CK_FloatingToIntegral: + case CK_FloatingToBoolean: case CK_FloatingCast: case CK_FloatingRealToComplex: case CK_FloatingComplexToReal: -- cgit v1.2.3