================
@@ -659,20 +660,24 @@ static char ConvertValueObjectStyleToChar(
 }
 
 static bool DumpValueWithLLVMFormat(Stream &s, llvm::StringRef options,
-                                    ValueObject &target) {
+                                    ValueObject &valobj) {
   std::string formatted;
   std::string llvm_format = ("{0:" + options + "}").str();
 
-  auto type_info = target.GetTypeInfo();
-  if (type_info & eTypeIsInteger) {
+  // Options supported by format_provider<T> for integral arithmetic types.
+  // See table in FormatProviders.h.
+  llvm::Regex int_format{"x[-+]?\\d*|n|d", llvm::Regex::IgnoreCase};
----------------
adrian-prantl wrote:

Should this be a static local, so the regex isn't compiled over and over?

https://github.com/llvm/llvm-project/pull/81196
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to