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

Unified Diff: src/IceTypes.h

Issue 1354673002: Fix call instructions to check parameter types for consistency. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: remove typo 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/IceTypes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTypes.h
diff --git a/src/IceTypes.h b/src/IceTypes.h
index f176e9bf92cdb681af778f76871334599b044ecc..f6705e9e5b981e6af5e83fba61d9da4d42478c9c 100644
--- a/src/IceTypes.h
+++ b/src/IceTypes.h
@@ -81,6 +81,14 @@ bool isVectorFloatingType(Type Ty);
/// Returns true if the given type can be used in a load instruction.
bool isLoadStoreType(Type Ty);
+/// Returns true if the given type can be used as a parameter type in a call.
+bool isCallParameterType(Type Ty);
+
+/// Returns true if the given type can be used as the return type of a call.
+inline bool isCallReturnType(Type Ty) {
+ return Ty == IceType_void || isCallParameterType(Ty);
+}
+
/// Returns type generated by applying the compare instructions (icmp and fcmp)
/// to arguments of the given type. Returns IceType_void if compare is not
/// allowed.
« no previous file with comments | « no previous file | src/IceTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698