aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-06-04 08:28:07 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-06-04 08:28:07 -0700
commit012feeb588d28e5604f0ab9f9d9555e63fd68648 (patch)
tree0a2b241fcb79d9bdc6e05035010c52434b04ceb1 /lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp
parentb32a69792213eef2ff93440ba09c659b28733169 (diff)
PNaCl ABI checker: Check for normal form introduced by ReplacePtrsWithInts
Move most of the per-instruction checking in PNaClABIVerifyFunctions::runOnFunction() to a top-level function so that it can do an early exit to reject the instruction. Reporting just a single error per instruction makes the test expectations easier to understand and update. Remove the check for metadata types. Metadata won't be part of PNaCl's stable ABI, so if the metadata-rejecting check is disabled for debugging purpose, we don't really need to recursively check the metadata's types. This lets us remove the recursive checks of Constants and types. We now only accept a very restricted, non-recursive set of Constants inside functions and global variable initialisers. This means PNaClABITypeChecker doesn't need to be stateful any more, and its methods can become static. This change also fixes a hole where the operands of "switch" instructions weren't fully checked. Add a test to replace-ptrs-with-ints.ll to ensure that "undef" doesn't appear directly in loads and stores. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343 TEST=PNaCl toolchain trybots + GCC torture tests + LLVM test suite Review URL: https://codereview.chromium.org/15780014
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp')
0 files changed, 0 insertions, 0 deletions