Initial import of libdpf.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 14:08:32 -06:00
commit e4e666f459
4563 changed files with 1690372 additions and 0 deletions

40
thirdparty/hedley/test/likely.c vendored Normal file
View file

@ -0,0 +1,40 @@
#include "../hedley.h"
#if defined(_MSC_VER)
HEDLEY_DIAGNOSTIC_PUSH
#pragma warning(disable:4668)
#include <assert.h>
#include <stddef.h>
HEDLEY_DIAGNOSTIC_POP
#else
#include <assert.h>
#include <stddef.h>
#endif
#if \
defined(HEDLEY_TI_CL6X_VERSION) || \
defined(HEDLEY_TI_CL7X_VERSION)
/* __builtin_expect with second argument not equal to 0 or 1 is ignored */
# pragma diag_remark 1362
#endif
int main(int argc, char* argv[HEDLEY_ARRAY_PARAM(argc)]) {
int res;
HEDLEY_STATIC_CAST(void, argv);
res = (HEDLEY_PREDICT(argc + 1, 2, 0.95) == 2);
assert(res);
res = (HEDLEY_UNPREDICTABLE(argc + 1) == 2);
assert(res);
res = (HEDLEY_PREDICT_TRUE(argc + 1, 0.95) == 1);
assert(res);
res = (HEDLEY_PREDICT_FALSE(argc + 1, 0.95) == 1);
assert(res);
res = (HEDLEY_LIKELY(argc + 1) == 1);
assert(res);
res = (HEDLEY_UNLIKELY(argc + 1) == 1);
assert(res);
return !res;
}