[libc-commits] [PATCH] D156264: [libc] Move public assert to macro printing

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jul 25 14:30:07 PDT 2023


michaelrj created this revision.
michaelrj added reviewers: sivachandra, lntue, JonChesterfield, jhuber6.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
michaelrj requested review of this revision.

The previous assert patch only changed the internal LIBC_ASSERT macro.
The public assert function also needs to be moved since the previous
printing method was removed. This patch refactors the display code into
a separate file so that it can safely be included by external code. This
isn't ideal, but passing the macros to functions turns them from literal
strings to char*s, requiring manual concatenation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156264

Files:
  libc/src/__support/CMakeLists.txt
  libc/src/__support/display_assert.h
  libc/src/__support/libc_assert.h
  libc/src/assert/CMakeLists.txt
  libc/src/assert/__assert_fail.cpp
  libc/src/assert/__assert_fail.h
  libc/src/assert/assert.h
  utils/bazel/llvm-project-overlay/libc/BUILD.bazel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156264.544100.patch
Type: text/x-patch
Size: 7209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230725/4180961d/attachment.bin>


More information about the libc-commits mailing list