search for: hasconstantvalue

Displaying 3 results from an estimated 3 matches for "hasconstantvalue".

2019 Apr 04
2
[RFC] Should we add isa_or_null<>?
On Thu, Apr 4, 2019 at 6:29 PM Craig Topper <craig.topper at gmail.com> wrote: > There are a handful of places in LLVM that dosomething like if > (dyn_cast_or_null<UndefValue>(P->hasConstantValue())) > Yes, I've seen those, but while working on a new checker, I was advised that replacing `X && isa<Y>(X)` with `dyn_cast_or_null<Y>(X)` was suboptimal, and it was suggested something like a `isa_or_null` style operator would better express what was actually going on,...
2019 Apr 05
2
[RFC] Should we add isa_or_null<>?
...PM Don Hinton <hintonda at gmail.com> wrote: > >> On Thu, Apr 4, 2019 at 6:29 PM Craig Topper <craig.topper at gmail.com> >> wrote: >> >>> There are a handful of places in LLVM that dosomething like if >>> (dyn_cast_or_null<UndefValue>(P->hasConstantValue())) >>> >> >> Yes, I've seen those, but while working on a new checker, I was advised >> that replacing `X && isa<Y>(X)` with `dyn_cast_or_null<Y>(X)` was >> suboptimal, and it was suggested something like a `isa_or_null` style >> opera...
2019 Apr 04
2
[RFC] Should we add isa_or_null<>?
I've added a patch, temporarily using the name Chris suggested. Please let me know what you think. https://reviews.llvm.org/D60291 thanks... don On Thu, Apr 4, 2019 at 2:55 PM David Greene <dag at cray.com> wrote: > Don Hinton <hintonda at gmail.com> writes: > > > > if (isa_or_null<T>(var)) { > > > ... > > > } > > > >