summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-01-25 05:04:17 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-01-25 05:04:17 +0000
commit5995489d27065a018e209d431cd26ea592642f2a (patch)
tree0ae0520a513fa60f09d45270aebb7d534883236e /clang/lib/CodeGen/CGExpr.cpp
parent5bcf070e68b6548cbe316efb07faba45e94447c4 (diff)
downloadbcm5719-llvm-5995489d27065a018e209d431cd26ea592642f2a.tar.gz
bcm5719-llvm-5995489d27065a018e209d431cd26ea592642f2a.zip
Fix a crash for an edge case of the GNU ?: extension.
llvm-svn: 148923
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index db87cba9a0f..5c2061bed03 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -1999,6 +1999,8 @@ EmitConditionalOperatorLValue(const AbstractConditionalOperator *expr) {
return EmitAggExprToLValue(expr);
}
+ OpaqueValueMapping binding(*this, expr);
+
const Expr *condExpr = expr->getCond();
bool CondExprBool;
if (ConstantFoldsToSimpleInteger(condExpr, CondExprBool)) {
@@ -2009,8 +2011,6 @@ EmitConditionalOperatorLValue(const AbstractConditionalOperator *expr) {
return EmitLValue(live);
}
- OpaqueValueMapping binding(*this, expr);
-
llvm::BasicBlock *lhsBlock = createBasicBlock("cond.true");
llvm::BasicBlock *rhsBlock = createBasicBlock("cond.false");
llvm::BasicBlock *contBlock = createBasicBlock("cond.end");
OpenPOWER on IntegriCloud