aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
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
commit2c0c745709c9f258f4c968bcf3e891faa9acbca6 (patch)
tree7c54366efda7a625a932f7a6b5695b4a765347c7 /lib/CodeGen
parent8c9fe200890663e1026be25d66f0929caa87a0ca (diff)
Fix a crash for an edge case of the GNU ?: extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index db87cba9a0..5c2061bed0 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/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");