[Lldb-commits] [PATCH] D66546: Extend FindTypes w/ CompilerContext to allow filtering by language

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 21 13:55:16 PDT 2019

JDevlieghere added a comment.

I think the functionality is fine.

I know this is a little ironic, given that we just had this discussion, but I would propose wrapping the `SmallBitVector` here. That way you can abstracting away the details about the underlying enum values, the size, and make the whole thing type safe. Although I agree with Pavel's earlier comment, I think subclassing might even be a good fit, so that you don't have to wrap the operator and set methods, but either having the `SmallBitVector` as a member is fine with me too.

Comment at: lldb/source/Symbol/ClangASTContext.cpp:802
+llvm::SmallBitVector ClangASTContext::GetSupportedLanguages() const {
+  llvm::SmallBitVector languages(64-8, 0);
+  static_assert(eNumLanguageTypes < 64-8,
Let's add a comment why you choose 64-8 and why we can't use those last 8 bits.



More information about the lldb-commits mailing list