diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-24 18:12:39 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-24 18:12:39 +0000 |
commit | 15583e4493b750a5e14f006dbc1555a5d32eb01d (patch) | |
tree | 301f224b6e60196267b92b280ebdd63b7fdf8aa5 | |
parent | 83133d9a74e9491a8ee22746d897213efbcc2da3 (diff) | |
download | bcm5719-llvm-15583e4493b750a5e14f006dbc1555a5d32eb01d.tar.gz bcm5719-llvm-15583e4493b750a5e14f006dbc1555a5d32eb01d.zip |
Pass the cast kind to ScalarExprEmitter::EmitCastExpr.
llvm-svn: 79928
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index bd005943a20..d94ee5bed21 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -232,9 +232,9 @@ public: if (E->getType()->isVariablyModifiedType()) CGF.EmitVLASize(E->getType()); - return EmitCastExpr(E->getSubExpr(), E->getType()); + return EmitCastExpr(E->getSubExpr(), E->getType(), E->getCastKind()); } - Value *EmitCastExpr(const Expr *E, QualType T); + Value *EmitCastExpr(const Expr *E, QualType T, CastExpr::CastKind Kind); Value *VisitCallExpr(const CallExpr *E) { if (E->getCallReturnType()->isReferenceType()) @@ -645,14 +645,15 @@ Value *ScalarExprEmitter::VisitImplicitCastExpr(const ImplicitCastExpr *E) { return V; } - return EmitCastExpr(Op, E->getType()); + return EmitCastExpr(Op, E->getType(), E->getCastKind()); } // VisitCastExpr - Emit code for an explicit or implicit cast. Implicit casts // have to handle a more broad range of conversions than explicit casts, as they // handle things like function to ptr-to-function decay etc. -Value *ScalarExprEmitter::EmitCastExpr(const Expr *E, QualType DestTy) { +Value *ScalarExprEmitter::EmitCastExpr(const Expr *E, QualType DestTy, + CastExpr::CastKind Kind) { if (!DestTy->isVoidType()) TestAndClearIgnoreResultAssign(); |