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

Don Hinton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 31 18:59:25 PDT 2017


hintonda added a comment.



In https://reviews.llvm.org/D39436#911875, @clayborg wrote:

> A few general things: don't modify FileSpec, we have many of these objects and we can't increase their size without directly affecting memory usage. FileSpec objects represent one file on disk, not multiple. We should make a new class that contains a FileSpec and a regex, but not put it into FileSpec.


Will do...

Btw, if size is an issue, would it make sense to add a type to the enum declarations?  e.g.:

  diff --git a/include/lldb/Utility/FileSpec.h b/include/lldb/Utility/FileSpec.h
  index 67926d01e..55d44d840 100644
  --- a/include/lldb/Utility/FileSpec.h
  +++ b/include/lldb/Utility/FileSpec.h
  @@ -61,7 +61,7 @@ namespace lldb_private {
   //----------------------------------------------------------------------
   class FileSpec {
   public:
  -  enum PathSyntax {
  +  enum PathSyntax : unsigned char {
       ePathSyntaxPosix,
       ePathSyntaxWindows,
       ePathSyntaxHostNative


https://reviews.llvm.org/D39436





More information about the lldb-commits mailing list