================
@@ -658,6 +659,38 @@ static char ConvertValueObjectStyleToChar(
return '\0';
}
+static llvm::Regex LLVMFormatPattern{"x[-+]?\\d*|n|d",
llvm::Regex::IgnoreCase};
+
+static bool DumpValueWithLLVMFormat(Stream &s, llvm::StringRef options,
+ ValueObject &valobj) {
+ std::string formatted;
+ std::string llvm_format = ("{0:" + options + "}").str();
+
+ // Options supported by format_provider<T> for integral arithmetic types.
+ // See table in FormatProviders.h.
+
+ auto type_info = valobj.GetTypeInfo();
+ if (type_info & eTypeIsInteger && LLVMFormatPattern.match(options)) {
----------------
adrian-prantl wrote:
```suggestion
if ((type_info & eTypeIsInteger) && LLVMFormatPattern.match(options)) {
```
https://github.com/llvm/llvm-project/pull/91868
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits