From 51954276ccee058ba3e82f41fb09e77da39d2d85 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 13 Jul 2010 23:17:26 +0000 Subject: Introduce a new cast kind for an "lvalue bitcast", which handles reinterpret_casts (possibly indirectly via C-style/functional casts) on values, e.g., int i; reinterpret_cast(i); The IR generated for this is essentially the same as for *reinterpret_cast(&i). Fixes PR6437, PR7593, and PR7344. llvm-svn: 108294 --- clang/lib/CodeGen/CGExprAgg.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/CodeGen/CGExprAgg.cpp') diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 20722f7..219a5f9 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -307,6 +307,10 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) { break; } + case CastExpr::CK_LValueBitCast: + llvm_unreachable("there are no lvalue bit-casts on aggregates"); + break; + case CastExpr::CK_BitCast: { // This must be a member function pointer cast. Visit(E->getSubExpr()); -- cgit v1.1