bulbazord wrote:

> Thinking about this, I'd like to add a getter and setter for the address 
> range and the re-export info in Symbol, and make all Symbol methods that 
> access these go through those two methods. Those two methods will do a 
> debug-builds assert that the `m_type` is correct for the access being 
> requested. I'd feel a lot more confident about this change, and the long term 
> safety, with that in place. Let me put that together. That will give us the 
> safety of a std::variant without doubly-storing the m_type field and 
> increasing the Symbol object size.

Good idea. What I was worried about was that somebody may have been accessing a 
field improperly (i.e. asking for the Address and then converting it into a 
host-address ConstString). Glad to hear ASAN and UBSAN caught nothing.

https://github.com/llvm/llvm-project/pull/213356
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to