summaryrefslogtreecommitdiff
path: root/upb/upb.h
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2017-07-08 00:00:05 -0700
committerJosh Haberman <jhaberman@gmail.com>2017-07-08 00:00:05 -0700
commit1aafd4111b9b6d08d2d0937b0f396a4caa9ea04d (patch)
tree9bcb6c61ee333de00819973f3a3acd8aab9238e5 /upb/upb.h
parentdd536fd567b2ba9bed67a0094c5cd905c774f951 (diff)
A good start on upb_encode and upb_decode.
Diffstat (limited to 'upb/upb.h')
-rw-r--r--upb/upb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/upb/upb.h b/upb/upb.h
index a2b79ca..19cd02c 100644
--- a/upb/upb.h
+++ b/upb/upb.h
@@ -34,6 +34,9 @@ template <int N> class InlinedEnvironment;
#define UPB_INLINE static
#endif
+/* Hints to the compiler about likely/unlikely branches. */
+#define UPB_LIKELY(x) __builtin_expect((x),1)
+
/* Define UPB_BIG_ENDIAN manually if you're on big endian and your compiler
* doesn't provide these preprocessor symbols. */
#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback