Displaying 20 results from an estimated 2000 matches similar to: "[RFC] Should we add isa_or_null<>?"
2019 Apr 04
2
[RFC] Should we add isa_or_null<>?
On Thu, Apr 4, 2019 at 10:30 AM David Greene <dag at cray.com> wrote:
> I don't think that's a correct replacement.
>
> if (var && isa<T>(var)) {
> ...
> }
>
> is not the same as:
>
> if (isa_or_null<T>(var)) {
> ...
> }
>
> at least according to what "isa_or_null" conveys to me.
>
This is the same
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)) {
> > > ...
> > > }
> > >
>
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
2019 Apr 04
4
[RFC] Should we add isa_or_null<>?
On Thu, Apr 4, 2019 at 12:58 PM Chris Lattner <clattner at nondot.org> wrote:
>
>
>
> > On Apr 4, 2019, at 5:37 AM, Don Hinton via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> >
> > I'd like to propose adding `isa_or_null<>` to replace the following usage pattern that's relatively common in conditionals:
> >
> > var &&
2019 Apr 05
2
[RFC] Should we add isa_or_null<>?
On Thu, Apr 4, 2019 at 7:10 PM Craig Topper <craig.topper at gmail.com> wrote:
> Agreed that the new isa_or_null style is better. Just wanted mention the
> other style so we know we should migrate those to the new one.
>
I have a checker under review that could be enhanced to do that -- though
it currently replaces `X->foo() && isa<Y>(X->foo())` with
2019 Apr 10
2
[RFC] Should we add isa_or_null<>?
Don Hinton via llvm-dev <llvm-dev at lists.llvm.org> writes:
> Used like this: isa<T,1>(v) or isa<T, true>(v)
I don't think I would know what that means when I see it in code.
-David
> On Sat, Apr 6, 2019 at 9:45 AM Mehdi AMINI via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On Fri, Apr 5, 2019 at 5:15 AM Aaron Ballman via
2019 Apr 06
4
[RFC] Should we add isa_or_null<>?
What about a type not_null_impl<T> and we could write:
then you could just write bool x = isa<T>(not_null(val));
We provide a function not_null<T> that returns a not_null_impl<T>:
template<typename T>
not_null_impl<T> not_null(T *t) { return not_null_impl<T>{t}; }
and a specialization of isa that takes a not_null_impl<T>
template<typename T,
2019 Apr 07
2
[RFC] Should we add isa_or_null<>?
I read `isa<T>(or_null(v))` as "v is a T or nullptr", which does not match
the implementation semantics "v is a T and not null".
On Sat, Apr 6, 2019 at 9:31 PM Zachary Turner <zturner at google.com> wrote:
> Sorry, brain isn't fully working. I meant to call the function / type
> `or_null` instead of `not_null`
>
> On Sat, Apr 6, 2019 at 11:16 AM
2019 Apr 07
2
[RFC] Should we add isa_or_null<>?
I have to say `not_null(v)` reads more like an assertion than a predicate, in which case `isa<T>(not_null(v))` reads like it has the exact same semantics that `isa<T>(v)` has currently—asserts that `v` is not null.
I don't dispute that you can *make* it have the desired semantics, it just won't *look* that way.
maybe `isaT_or_null<Foo>(v)` ? Still looks awkward but maybe
2019 Apr 22
3
[RFC] Should we add isa_or_null<>?
Hi All:
Just wanted to wind this up and summarize the results.
Although there were a few no votes, it looks like there's a consensus for
adding a `isa_and_nonnull` type operator. While there were some who
preferred `isa_nonnull`, it wasn't overwhelming, and since
`isa_and_nonnull` is already committed, I'm going to leave it as
`isa_and_nonnull` for the time being.
Thanks for all
2019 May 05
3
[RFC] Should we add isa_or_null<>?
+1 on not adding the new API
On Sat, May 4, 2019, 11:51 AM David Blaikie via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> +1, if we're voting. I don't think it adds to the readability of code
> for me personally.
>
> On Sat, May 4, 2019 at 11:47 AM Chandler Carruth via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >
> > On Mon, Apr 29, 2019,
2019 May 04
2
[RFC] Should we add isa_or_null<>?
On Mon, Apr 29, 2019, 02:37 David Chisnall via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On 22/04/2019 15:15, Don Hinton via llvm-dev wrote:
> > Although there were a few no votes, it looks like there's a consensus
> > for adding a `isa_and_nonnull` type operator. While there were some who
> > preferred `isa_nonnull`, it wasn't overwhelming, and since
2019 Apr 05
2
[RFC] Should we add isa_or_null<>?
+1 for "isa_nonnull"
--paulr
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Hubert Tong via llvm-dev
Sent: Friday, April 05, 2019 12:10 AM
To: Aaron Ballman
Cc: LLVM Development List
Subject: Re: [llvm-dev] [RFC] Should we add isa_or_null<>?
On Thu, Apr 4, 2019 at 11:15 PM Aaron Ballman via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at
2007 Feb 08
5
New Bind Update
I was wondering if the new bind update is going smoothly for those who
have done it?
I've been a little hesitant to run it yet as the last time forced a bit
of time fixing things. I'm trying to plan if I need to have some hours
available for this or if it is like most of the time.. just do it and
everything's ok.
Best,
John Hinton
2006 Aug 22
4
Struggling with javac
I've installed jdk-1_5_0_08-linux-i586.rpm and Tomcat.
Working through some initial test install programs, I am finding that I
can't seem to compile .java files into classes.
For instance...
javac -classpath /usr/local/tomcat/common/lib/servlet.jar HelloWorld.java
as instructed fails with a
gij: unrecognized option -- `-classpath'
Try `gij --help' for more information.
So
2005 Apr 19
5
Rid me of this boot GUI
One of these days, RedHat might actually run me off!!!! AAAARGH!!!!
Can anyone tell me how to get CentOS 4 to simply boot to the console in
text mode? If I wanted a stinkin' GUI I would have installed winders!
Now, my KVM and 25 foot cord is just too long to send a GUI signal
across the room and I'm missing 50% of the screen.. striped vertically..
at about 1/8th inch spacing. Not
2005 Feb 07
3
Bind Issues
I'm running bind in a chroot environment. It seems that since the Redhat
snafu which wrecked bind (yes, I had caching nameserver running as well
but not anymore) I have been having problem with my slave nameservers
retrieving updates from the master.
Looking at the zone records, some are owned by root, some are owned by
named. I'm now confused as to what the ownership should be and
2007 Apr 12
6
CentOS 5 and bittorrent
Folks. This is likely to be the hardest hit CentOS has ever taken with
regards to bandwidth needs.
I was really hesitant to use bittorrent for this type of thing for a
long time. However, it really is nice to give back at least what you
take. At the moment, I'm seeing almost 3000 connections to the torrent.
That times 3.5 gigs is a pretty huge chunk of data... and it has just begun.
What
2011 Sep 27
3
Expunge Old Email
For those of you running mailservers on CentOS 6, what are the
suggestions for programs to expunge old email? For instance, deleting
email from a Spam folder that is 2 weeks old or older.
I see that Dovecot does have a solution, but was wondering about what
others have landed on.
My systems are basically Postfix, Dovecot using Maildir.
Thanks,
John Hinton
2008 Jul 19
6
Bind Firewall Rules
OK, so does anybody have a good firewall rule solution for what we're
supposed to be doing with bind these days? Obviously port 53 is no
longer enough.
TIA
John Hinton