[llvm] clang crash assigning to a global named register variable #109778 (PR #113105)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 05:34:36 PST 2024


DavidSpickett wrote:

It was a bit mind bending for me too but I figured out what the code is doing you can see that in the comment above.

If you want to continue to do something for this issue perhaps you could port the nicer error reporting from `llvm/lib/Target/RISCV/RISCVISelLowering.cpp` into the AArch64 function.

If you want something to build on from there, try moving the check for whether the register is reserved into the target lowering base class so that everyone will get the more precise error message. Be aware that some targets may care about other things as well as the register being reserved.

You could look into plumbing to get the error all the way back to clang's frontend, but I suspect that there are structural issues that make that difficult so I wouldn't advise it.

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


More information about the llvm-commits mailing list