[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 27 14:23:28 PDT 2017


On Fri, Oct 27, 2017 at 2:13 PM Jason Molenda <jmolenda at apple.com> wrote:

> haven't had a chance to look at the patch yet, but just to comment on one
> part from Zach:
>
> > On Oct 27, 2017, at 2:06 PM, Zachary Turner via Phabricator via
> lldb-commits <lldb-commits at lists.llvm.org> wrote:
> >
> >
> > ================
> > Comment at: source/Target/Platform.cpp:986-991
> > +    if (normalized_triple.getVendorName().empty())
> > +      normalized_triple.setVendor(compatible_triple.getVendor());
> > +    if (normalized_triple.getOSName().empty())
> > +      normalized_triple.setOS(compatible_triple.getOS());
> > +    if (normalized_triple.getEnvironmentName().empty())
> > +
> normalized_triple.setEnvironment(compatible_triple.getEnvironment());
> > ----------------
> > Are these cases even possible?  Why would the vendor and os ever be
> empty?  I thought only the environment could be empty.
> >
>
> This can happen when connecting to a bare board / low level firmware
> development.  You may only know armv7em-*-*.
>
>
But even then, they're not *empty*, they're equal to *.  And I would also
imagine that after it's passed to `Triple::normalize`, part of the
normalization would turn those *s into the "unknown", so you'd end up with
armv7em-unknown-unknown.  In which case they're still not empty., they're
just equal to "unknown".

Maybe I'm wrong though
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171027/bad7b79b/attachment.html>


More information about the lldb-commits mailing list