NoQ added a comment.

In D65382#1605769 <https://reviews.llvm.org/D65382#1605769>, 
@baloghadamsoftware wrote:

> Most managers are stateful because they also store the elements they manage 
> (e.g. `ProgramStateManager` stores states, `SValBuilder` owns other managers 
> such as `SymbolManager` that stores symbols etc.)


That's an implementation detail, a memoization, a good use case for `mutable` 
if we go for const-correctness. For example, no observable properties of 
`SymbolManager` change when it allocates a new symbol. The interface only 
allows you to ask "What's the symbol for a //value-that-transcends-time// with 
a certain identity?" and it retrieves you that symbol. There's no way to find 
out if the symbol is freshly created or already cached, and there shouldn't be 
a way to find this out, because this is entirely immaterial and meaningless.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65382/new/

https://reviews.llvm.org/D65382



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to