HomePhabricator

[libc] Add initial assert definition

Authored by abrachet on Mar 11 2020, 8:45 PM.

Description

[libc] Add initial assert definition

Summary: This patch adds a temporary __assert_fail and assert definition to make it available to internal llvm libc code. __assert_fail writes to fd 2 directly instead of stderr, using SYS_write. I have not put it in its own linux directory because this is temporary and it should be using stdio's api in the future. It does not currently print out the line number (although we could do that by stringifying __LINE__ if reviewers wish).

Reviewers: sivachandra, gchatelet, PaulkaToast

Reviewed By: sivachandra

Subscribers: mgorny, MaskRay, tschuett, libc-commits

Differential Revision: https://reviews.llvm.org/D75420

Details

Committed
abrachetMar 11 2020, 8:45 PM
Reviewer
sivachandra
Differential Revision
D75420: [libc] Add initial assert definition
Parents
rG6aebf0ee56e5: Specify branch probabilities for callbr dests
Branches
Unknown
Tags
Unknown