[Lldb-commits] [PATCH] D39436: Add regex support to file (-f) and module (-s) breakpoint options.

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 1 18:15:10 PDT 2017


zturner added inline comments.


================
Comment at: include/lldb/Utility/FileSpec.h:65-69
+  enum PathSyntax : unsigned char {
     ePathSyntaxPosix,
     ePathSyntaxWindows,
     ePathSyntaxHostNative
   };
----------------
hintonda wrote:
> zturner wrote:
> > This is actually a very nice change, as it reduces the size of `FileSpec` by a couple of bytes.  I think you can submit this change as a one-liner by itself, independent of this patch.
> I suppose it depends on you compiler/OS, but this by it self doesn't change the size of FileSpec at all -- just changes the padding from 3 to 6.  It's still the size of 3 pointers due to alignment -- at least that's my understanding.
> 
> However, if you did have a way to encode this stuff into the two existing pointers, it might help -- you still need at least 4 bits if I'm not mistaken.
It's possible for `sizeof(int)` to be equal to the size of a pointer.  This happens **always** when building x86, but it can happen on x64 too.  [[ https://godbolt.org/g/GN91oZ | For example ]].  Note that it returns 12.  If you remove the specification of the underlying type, it returns 16 instead.



https://reviews.llvm.org/D39436





More information about the lldb-commits mailing list