[llvm] Added const reference for params wth size >= 16 bytes (PR #125074)
Herman Semenoff via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 08:09:18 PST 2025
GermanAizek wrote:
> This PR needs breaking up into independent ones for easier review.
>
> Also, I'm pretty sure `MemoryBufferRef` is intended for passing by value (note the `Ref` part of the name). It's just a pair of pointers... 16 bytes is too small. By that logic, `std::string_view` should be passed by `const &`, at least on Windows, but presumably for others too.
I can split this PR into different branches with others PR, and I also analyzed all structures and classes as parameters under Linux, if there is changing size from OS, more code reviewers (Windows, MacOS, BSD) are needed.
https://github.com/llvm/llvm-project/pull/125074
More information about the llvm-commits
mailing list