Restructure some assertion checking based on post commit feedback by Aaron and Tom.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Philip Reames
2014-12-02 21:01:48 +00:00
parent d69ec73a46
commit 301256d436
2 changed files with 13 additions and 7 deletions

View File

@@ -129,7 +129,13 @@ class StatepointBase {
#ifndef NDEBUG
/// Asserts if this statepoint is malformed. Common cases for failure
/// include incorrect length prefixes for variable length sections or
/// illegal values for parameters.
void verify() {
assert(numCallArgs() >= 0 &&
"number of arguments to actually callee can't be negative");
// The internal asserts in the iterator accessors do the rest.
(void)call_args_begin();
(void)call_args_end();