diff options
author | Anders Carlsson <andersca@mac.com> | 2009-09-09 21:33:21 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-09-09 21:33:21 +0000 |
commit | 0aebc81e02397a5987aaa8e8c7acbdb01a31d7c3 (patch) | |
tree | 244e1626acebcedf768fd386036799602daa598c /lib/CodeGen/CodeGenFunction.cpp | |
parent | cfcd7fd0de701c5ce05e96de1ed2d0bf8c7035d9 (diff) |
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index be2406d063..05f94371cb 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -324,17 +324,6 @@ void CodeGenFunction::EmitBranchOnBoolExpr(const Expr *Cond, llvm::BasicBlock *FalseBlock) { if (const ParenExpr *PE = dyn_cast<ParenExpr>(Cond)) return EmitBranchOnBoolExpr(PE->getSubExpr(), TrueBlock, FalseBlock); - if (const CastExpr *E = dyn_cast<CastExpr>(Cond)) - if (E->getCastKind() == CastExpr::CK_UserDefinedConversion) { - if (const CXXFunctionalCastExpr *CXXFExpr = - dyn_cast<CXXFunctionalCastExpr>(E)) { - EmitCXXFunctionalCastExpr(CXXFExpr); - return; - } - else if (isa<CStyleCastExpr>(E)) - return EmitBranchOnBoolExpr(E->getSubExpr(), TrueBlock, FalseBlock); - assert(false && "EmitBranchOnBoolExpr - Expected CStyleCastExpr"); - } if (const BinaryOperator *CondBOp = dyn_cast<BinaryOperator>(Cond)) { // Handle X && Y in a condition. |