Index: src/types.h |
diff --git a/src/types.h b/src/types.h |
index df35c9e3346fc59bb024b965d928ae57705be48a..47f1de726e96cc0fc233a2c91b2defb6f2bad53c 100644 |
--- a/src/types.h |
+++ b/src/types.h |
@@ -275,10 +275,13 @@ class TypeImpl : public Config::Base { |
// Constructors. |
+ // Explicitly mask, since VS on Win64 (wrongly?) sign extends the enum value. |
#define DEFINE_TYPE_CONSTRUCTOR(type, value) \ |
- static TypeImpl* type() { return BitsetType::New(BitsetType::k##type); } \ |
+ static TypeImpl* type() { \ |
+ return BitsetType::New(BitsetType::k##type & 0xffffffffu); \ |
+ } \ |
static TypeHandle type(Region* region) { \ |
- return BitsetType::New(BitsetType::k##type, region); \ |
+ return BitsetType::New(BitsetType::k##type & 0xffffffffu, region); \ |
} |
BITSET_TYPE_LIST(DEFINE_TYPE_CONSTRUCTOR) |
#undef DEFINE_TYPE_CONSTRUCTOR |