Start working on a VFS implementation #22

Closed
apio wants to merge 44 commits from oop-vfs into main
2 changed files with 5 additions and 1 deletions
Showing only changes of commit dc795ff491 - Show all commits

View File

@ -19,6 +19,10 @@
if (!(expr)) [[unlikely]] { __check_failed(location, message); } \ if (!(expr)) [[unlikely]] { __check_failed(location, message); } \
} while (0) } while (0)
// Fail with an error message and location.
#define fail(message) __check_failed(SourceLocation::current(), message)
#define fail_at(location, message) __check_failed(location, message)
// Like assert(), but always enabled. // Like assert(), but always enabled.
#define check(expr) \ #define check(expr) \
do { \ do { \

View File

@ -7,7 +7,7 @@ using namespace UBSAN::UBInfo;
[[noreturn]] void ub_panic(SourceLocation caller = SourceLocation::current()) [[noreturn]] void ub_panic(SourceLocation caller = SourceLocation::current())
{ {
expect_at(false, caller, "Undefined behavior"); fail_at(caller, "Undefined behavior");
} }
#define DISPLAY(loc) loc.file, loc.line, loc.column #define DISPLAY(loc) loc.file, loc.line, loc.column