DescriptionPNaCl: Fix ExpandCtors to handle an empty list case
While writing a test, I noticed that ExpandCtors crashes if given the
empty list "[]", because this gets converted into an UndefValue
ConstantExpr by the LLVM assembly reader.
Fix this by checking the array's size via its type. This replaces the
isNullValue() check.
Make error handling cleaner by splitting out a separate function.
BUG=none
TEST=test/Transforms/NaCl/expand-ctors-emptylist.ll
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=099f6bf
Patch Set 1 #
Total comments: 3
Messages
Total messages: 5 (0 generated)
|