================
@@ -96,6 +101,17 @@ lldb::ChildCacheState GenericBitsetFrontEnd::Update() {
if (auto arg = m_backend.GetCompilerType().GetIntegralTemplateArgument(0))
size = arg->value.GetAPSInt().getLimitedValue();
+ else {
+ // PDB doesn't create template types. Instead, the type is a (non-template)
+ // struct with the name "bitset<N>".
+ ConstString type_name =
+ m_backend.GetCompilerType().GetTypeName(/*BaseOnly=*/true);
+ llvm::StringRef size_str = type_name.GetStringRef();
+ size_str.consume_front("bitset<");
+ size_str.consume_back(">");
+ if (size_str.getAsInteger(10, size))
----------------
Michael137 wrote:
Yea that happens for nested templates. The size argument to a `bitset` is a
`size_t`, and thus could never be a template.
I'd prefer not adding the `trim` until we have a concrete use-case, to avoid
confusing future readers
https://github.com/llvm/llvm-project/pull/175570
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits