diff --git a/sledge/model/llair_intrinsics.h b/sledge/model/llair_intrinsics.h index 3f74125a9..bfebe7622 100644 --- a/sledge/model/llair_intrinsics.h +++ b/sledge/model/llair_intrinsics.h @@ -23,6 +23,12 @@ __attribute__((noreturn)) void __llair_throw(void* thrown_exception); /* executions that call __llair_unreachable are assumed to be impossible */ __attribute__((noreturn)) void __llair_unreachable(); +/* glibc version */ +#define __assert_fail(assertion, file, line, function) abort() + +/* macos version */ +#define __assert_rtn(function, file, line, assertion) abort() + #ifdef __cplusplus } #endif diff --git a/sledge/test/analyze/assert.c b/sledge/test/analyze/assert.c new file mode 100644 index 000000000..133d23725 --- /dev/null +++ b/sledge/test/analyze/assert.c @@ -0,0 +1,13 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include + +void main() { + int x, y; + assert(x != y); +}