jingham added a comment.

It would be great not to have to use comments to express what these values 
mean.  OTOH, having to put in static casts whenever you want to or values 
together would be a pain, so if there's no way to do it without magic, I'm a 
little less enthused...

But on the magic: It looks like BitMaskEnum.h pulls in MathTypes.h which pulls 
in Compiler.h which then pulls in llvm-config.h.  You are supposed to be able 
to build tools on top of lldb with just the headers that go in LLDB.framework, 
you are not required to have the full source tree for an lldb build.  I don't 
want to impose that restriction without very good reason, and fixing this wart 
doesn't rise to that level.  Anyway, so if we want to include BitMaskEnum.h we 
would be required to ship a bunch of llvm headers (including some build 
produced ones IIUC).  I don't think that's a very good idea.

It also looks to me like the value of the largest item + 1 gets baked into the 
operator overloading code.  What would happen if we decided to add an element 
to the enum?


https://reviews.llvm.org/D53597



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to