[Lldb-commits] [lldb] [lldb] Support custom LLVM formatting for variables (PR #81196)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 21 14:51:44 PDT 2024
================
@@ -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
More information about the lldb-commits
mailing list