Skip to content

Commit

Permalink
Add parseAPI/util.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 465e6a0 commit 7548aee
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/parseAPI/developer/util.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,14 @@
util.h
======

.. cpp:namespace:: Dyninst::parseAPI
.. code:: c
#define HASHDEF(h,k) (h.find(k) != h.end())
#ifdef __GNUC__
# define likely(x) __builtin_expect(!!(x), 1)
# define unlikely(x) __builtin_expect(!!(x), 0)
#else
# define likely(x) x
# define unlikely(x) x
#endif

0 comments on commit 7548aee

Please sign in to comment.