Add implementations of sizeof and offsetof for class types.

Change-Id: I014205daafa6201f5d1d7d206e34632384a25f79
diff --git a/src/macros.h b/src/macros.h
index 39cecf2..95c2590 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -30,4 +30,11 @@
   TypeName();                                    \
   DISALLOW_COPY_AND_ASSIGN(TypeName)
 
+#define SIZEOF_MEMBER(t, f) sizeof(((t*) 4096)->f)
+
+#define OFFSETOF_MEMBER(t, f)         \
+  (reinterpret_cast<char*>(           \
+     &reinterpret_cast<t*>(16)->f) -  \
+   reinterpret_cast<char*>(16))
+
 #endif  // ART_MACROS_H_