[Lldb-commits] [PATCH] D48479: Represent invalid UUIDs as UUIDs with length zero

Leonard Mosescu via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 22 12:54:21 PDT 2018


>
> I'm not sure if there is a suitable place for that function. This is
> needed in  "ObjectFileMachO" and two dynamic loader plugins.


Then your factory idea may be the next best thing. While we're at it, maybe
we can remove the UUID::SetBytes() from the public interface, and make the
UUID an immutable value type:

Ex. instead of:

UUID uuid;
...
uuid.SetBytes(...)

We'd have:

UUID uuid;

uuid = UUID(...);
// or
uuid = { ... };
// or
uuid = UUID::factory(...);

What do you think?

On Fri, Jun 22, 2018 at 12:29 PM, Pavel Labath via Phabricator <
reviews at reviews.llvm.org> wrote:

> labath added a comment.
>
> In https://reviews.llvm.org/D48479#1141067, @lemo wrote:
>
> >   One solution might be to encapsulate the MachO convention in the MachO
> >
> > code: check in there (maybe through a helper function) if the UUID is
> >  "000...0" and map it to the empty UUID in that case. The UUID interface
> >  would not have to know/care about this convention. Would this work?
>
>
> I'm not sure if there is a suitable place for that function. This is
> needed in  "ObjectFileMachO" and two dynamic loader plugins.
>
>
> https://reviews.llvm.org/D48479
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180622/90dfc499/attachment-0001.html>


More information about the lldb-commits mailing list