[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

Michael Kenzel via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 14:03:12 PST 2023


michael-kenzel wrote:

> [AddressSpace.hpp](https://github.com/llvm/llvm-project/pull/72040/files#diff-dc10e493a84f7de241e331f66a5af195689f08d45a6fd0da90b275a662856327) was using `snprintf` to copy strings into a buffer. I replaced those uses with `strncpy` to remove the need for `<stdio.h>`.

As discussed with @arichardson, I've replaced `strncpy` with `strlen` + `memcpy`.

https://github.com/llvm/llvm-project/pull/72040


More information about the cfe-commits mailing list