NagyDonat wrote:

@Xazax-hun 
When you write that this commit "makes memspaces a bit more error prone to use. 
Do you think we could find a way to prevent using isa on memspaces?" do I 
understand it correctly you mean that it's error-prone to use 
`isa<...>(MR->getMemorySpace())` directly? This expression is indeed 
error-prone, but the problem is not the use of `isa` but the use of the method 
`getMemorySpace()` which will sometimes return incorrect (not the most 
accurate) data after this commit.

I think and hope that this error-prone situation will be resolved soon in a 
follow-up commit that completely transfers the handling of memory spaces to the 
state trait, because after that point `MemRegion` won't have an internal not 
entirely accurate reference to its memory space and all memory space lookups 
would look like `getMemSpace(MR, State)` (and it will be fine to call `isa` on 
this function).

https://github.com/llvm/llvm-project/pull/123003
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to