commit | b62ff2473fdcef6c47e048e7af79c07ea4299236 | [log] [tgz] |
---|---|---|
author | Nuno Lopes <nunoplopes@sapo.pt> | Wed Jun 04 19:15:45 2008 +0000 |
committer | Nuno Lopes <nunoplopes@sapo.pt> | Wed Jun 04 19:15:45 2008 +0000 |
tree | 2d812196502712f4d0347e66a09d33e81a3c067c | |
parent | 4ba41fd9df8d422d51640ee62c948ed93b35cbeb [diff] [blame] |
fix crash when codegening 'cond ? lhs : call-to-void-func()' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51958 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 622d2c5..ea92828 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp
@@ -1074,7 +1074,7 @@ CGF.EmitBlock(ContBlock); - if (!LHS) { + if (!LHS || !RHS) { assert(E->getType()->isVoidType() && "Non-void value should have a value"); return 0; }