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

Unified Diff: src/IceIntrinsics.h

Issue 1347683002: Subzero: Fix off-by-one asserts in intrinsic info lookup routines. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add real uses of getReturnType() and getNumArgs() Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceIntrinsics.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceIntrinsics.h
diff --git a/src/IceIntrinsics.h b/src/IceIntrinsics.h
index 75e67aa70cd52cd39dc8b355eb353b1fecef041d..9270aa4a4f69541acb81e19caecbbcf90c482307 100644
--- a/src/IceIntrinsics.h
+++ b/src/IceIntrinsics.h
@@ -140,13 +140,13 @@ public:
/// Returns the return type of the intrinsic.
Type getReturnType() const {
- assert(NumTypes > 1);
+ assert(NumTypes > 0);
return Signature[0];
}
/// Returns number of arguments expected.
SizeT getNumArgs() const {
- assert(NumTypes > 1);
+ assert(NumTypes > 0);
return NumTypes - 1;
}
« no previous file with comments | « no previous file | src/IceIntrinsics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698