llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Make setPSet/getPSet more robust?

Open Xazax-hun opened this issue 7 years ago • 2 comments

It is more of a question than a bug or feature. Lots of the visit functions have extra checks if an expression can have a PSet. We might also miss some checks.

Maybe it would be better to just make getPSet and setPSet noop for expressions without psets and simplify the visit functions? This way we would never miss a check (but sometimes we might have redundant ones).

Xazax-hun avatar Sep 05 '18 22:09 Xazax-hun

Fyi: compiler explorer (llvm default) builds without assertions, so there we don't have crashes but instead unknown psets.

mgehre avatar Sep 13 '18 20:09 mgehre

Great NEWS! The main intention of this PR is to reduce the number of hasPSet checks in the code. But in case that does not bother us, it is also OK. :)

Xazax-hun avatar Sep 13 '18 20:09 Xazax-hun