Index: src/profile-generator-inl.h |
diff --git a/src/profile-generator-inl.h b/src/profile-generator-inl.h |
index 3577219c1dd155825b3d3728b2801c49b015ebfc..8b5c1e21cb6a69c679cad070ab84b09ed5476357 100644 |
--- a/src/profile-generator-inl.h |
+++ b/src/profile-generator-inl.h |
@@ -122,15 +122,13 @@ CodeEntry* ProfileGenerator::EntryForVMState(StateTag tag) { |
} |
-#ifdef WIN32 |
inline uint64_t HeapEntry::id() { |
- return *(reinterpret_cast<uint64_t*>(&id_)); |
+ union { |
+ Id stored_id; |
+ uint64_t returned_id; |
+ } id_adaptor = {id_}; |
+ return id_adaptor.returned_id; |
} |
-#else |
-inline uint64_t HeapEntry::id() { |
- return id_; |
-} |
-#endif |
template<class Visitor> |