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 | e9766d559ba577ba8e21d450feaae88c606e0ba3 (patch) | |
tree | 1fa26363e225872ed31fc8298bb1ea66b7511b7a /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 572a0df0fcc077919258f4d9130ff1a9d5ad019d (diff) | |
download | bcm5719-llvm-e9766d559ba577ba8e21d450feaae88c606e0ba3.tar.gz bcm5719-llvm-e9766d559ba577ba8e21d450feaae88c606e0ba3.zip |
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.
llvm-svn: 81383
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index be2406d063b..05f94371cb2 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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. |