[Lldb-commits] [lldb] [lldb] Support custom LLVM formatting for variables (PR #81196)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 20 09:15:21 PDT 2024
================
@@ -658,6 +658,33 @@ static char ConvertValueObjectStyleToChar(
return '\0';
}
+static bool DumpValueWithLLVMFormat(Stream &s, llvm::StringRef options,
+ ValueObject &target) {
+ std::string formatted;
+ std::string llvm_format = ("{0:" + options + "}").str();
----------------
adrian-prantl wrote:
Is there any way we can make this string static, by switching over the supported options?
Or let me ask another way — what happens if options contained "}{1}" is this well-defined in llvm::formatv because it knows the template arguments and thus will not lead to corruption and crashes?
If the answer is yes, then this is okay.
https://github.com/llvm/llvm-project/pull/81196
More information about the lldb-commits
mailing list