[libc-commits] [libc] [libc][realpath][test] Create test files/directories (PR #209369)

Jackson Stogel via libc-commits libc-commits at lists.llvm.org
Tue Jul 14 23:14:54 PDT 2026


jtstogel wrote:

> Should we hold for that?

I'm not too concerned about the bump to 1 MiB, but it could be smaller. I looked into it some, and `cpp::string` is using way more memory than it needed. It allocates a whole bunch of temporary strings unnecessarily. For example `operator=(string_view)` constructs a temp `string`: https://github.com/llvm/llvm-project/blob/c4830afdbbc7b16a52a05d6a5b56e6c3fc14fb98/libc/src/__support/CPP/string.h#L106-L108

And `+=` does so too. I'll send out a fix for that in another PR, we can wait until that's fixed if you want.

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


More information about the libc-commits mailing list