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 | 4e382f3130834ac9862047a1f40402f261424774 (patch) | |
| tree | c80c9074bec49a20a1f0f7f2b4cf06597c58e48c /lib/CodeGen/CGExprScalar.cpp | |
| parent | 26ba8507089ec8ea37804c32f78e2e1f8bc2a4f2 (diff) | |
| download | clang-4e382f3130834ac9862047a1f40402f261424774.tar.gz clang-4e382f3130834ac9862047a1f40402f261424774.tar.bz2 clang-4e382f3130834ac9862047a1f40402f261424774.tar.xz | |
Pass the cast kind to ScalarExprEmitter::EmitCastExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index bd005943a2..d94ee5bed2 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/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(); |
