[Lldb-commits] [lldb] [llvm] [NFC] Ensure MCTargetOptions outlives MCAsmInfo at createMCAsmInfo call sites (PR #180465)

Aiden Grossman via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 16 11:50:46 PST 2026


https://github.com/boomanaiden154 approved this pull request.

> I believe https://github.com/llvm/llvm-project/pull/180465 + https://github.com/llvm/llvm-project/pull/180464 is the best approach. Changing the createMCRegInfo parameter to a rvalue reference requires update to every call site (many more than https://github.com/llvm/llvm-project/pull/180465) and incurs the MCTargetOptions move overhead.

I'm not sure the move overhead would be high (especially if we use a `unique_ptr` but then we have the overhead of indirect accesses). Updating every call site would definitely be a lot of work though. I think this approach now seems reasonable enough to me.

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


More information about the lldb-commits mailing list