Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Issue 15659005: PNaCl: Fix ExpandCtors to handle an empty list case (Closed)

Created:
7 years, 7 months ago by Mark Seaborn
Modified:
7 years, 7 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
http://git.chromium.org/native_client/pnacl-llvm.git@master
Visibility:
Public.

Description

PNaCl: 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -18 lines) Patch
M lib/Transforms/NaCl/ExpandCtors.cpp View 2 chunks +34 lines, -18 lines 0 comments Download
A test/Transforms/NaCl/expand-ctors-emptylist.ll View 1 chunk +13 lines, -0 lines 3 comments Download

Messages

Total messages: 5 (0 generated)
Mark Seaborn
7 years, 7 months ago (2013-05-22 15:01:21 UTC) #1
jvoung (off chromium)
https://codereview.chromium.org/15659005/diff/1/test/Transforms/NaCl/expand-ctors-emptylist.ll File test/Transforms/NaCl/expand-ctors-emptylist.ll (right): https://codereview.chromium.org/15659005/diff/1/test/Transforms/NaCl/expand-ctors-emptylist.ll#newcode1 test/Transforms/NaCl/expand-ctors-emptylist.ll:1: ; RUN: opt %s -nacl-expand-ctors -S | FileCheck %s ...
7 years, 7 months ago (2013-05-22 15:47:21 UTC) #2
Mark Seaborn
https://codereview.chromium.org/15659005/diff/1/test/Transforms/NaCl/expand-ctors-emptylist.ll File test/Transforms/NaCl/expand-ctors-emptylist.ll (right): https://codereview.chromium.org/15659005/diff/1/test/Transforms/NaCl/expand-ctors-emptylist.ll#newcode1 test/Transforms/NaCl/expand-ctors-emptylist.ll:1: ; RUN: opt %s -nacl-expand-ctors -S | FileCheck %s ...
7 years, 7 months ago (2013-05-22 16:30:38 UTC) #3
jvoung (off chromium)
lgtm https://codereview.chromium.org/15659005/diff/1/test/Transforms/NaCl/expand-ctors-emptylist.ll File test/Transforms/NaCl/expand-ctors-emptylist.ll (right): https://codereview.chromium.org/15659005/diff/1/test/Transforms/NaCl/expand-ctors-emptylist.ll#newcode1 test/Transforms/NaCl/expand-ctors-emptylist.ll:1: ; RUN: opt %s -nacl-expand-ctors -S | FileCheck ...
7 years, 7 months ago (2013-05-22 16:50:40 UTC) #4
Mark Seaborn
7 years, 7 months ago (2013-05-22 17:09:55 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 manually as r099f6bf (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698