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

Unified Diff: src/IceTypes.cpp

Issue 576243002: Add switch instruction to Subzero bitcode reader. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix issues in patch set 2. Created 6 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 | « src/IceTypes.h ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTypes.cpp
diff --git a/src/IceTypes.cpp b/src/IceTypes.cpp
index a3e19ae07c001c3685c65da1700b21faa9c59782..29ff4de0799375d870be2385b40c53862dd641cd 100644
--- a/src/IceTypes.cpp
+++ b/src/IceTypes.cpp
@@ -228,6 +228,13 @@ Type getCompareResultType(Type Ty) {
return IceType_void;
}
+SizeT getScalarIntBitWidth(Type Ty) {
+ assert(isScalarIntegerType(Ty));
+ if (Ty == Ice::IceType_i1)
+ return 1;
+ return typeWidthInBytes(Ty) * CHAR_BIT;
+}
+
// ======================== Dump routines ======================== //
const char *typeString(Type Ty) {
« no previous file with comments | « src/IceTypes.h ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698