Add a CK_ArrayToPointerDecay cast kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 0f8d38e..3a9ec7e 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -595,6 +595,7 @@
// If this is due to array->pointer conversion, emit the array expression as
// an l-value.
if (Op->getType()->isArrayType()) {
+ assert(E->getCastKind() == CastExpr::CK_ArrayToPointerDecay);
Value *V = EmitLValue(Op).getAddress(); // Bitfields can't be arrays.
// Note that VLA pointers are always decayed, so we don't need to do