diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-06-04 19:15:45 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-06-04 19:15:45 +0000 |
commit | 108f55d6fd9a1c0e753eb8e046cb1f1b81d77a76 (patch) | |
tree | 2d812196502712f4d0347e66a09d33e81a3c067c /lib/CodeGen/CGExprScalar.cpp | |
parent | d8de725d95cb29db175f6430c5911ff092271f2e (diff) |
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
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 622d2c5317..ea92828f72 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1074,7 +1074,7 @@ VisitConditionalOperator(const ConditionalOperator *E) { CGF.EmitBlock(ContBlock); - if (!LHS) { + if (!LHS || !RHS) { assert(E->getType()->isVoidType() && "Non-void value should have a value"); return 0; } |