=?utf-8?q?Andrés?= Villegas <andre...@google.com>, =?utf-8?q?Andrés?= Villegas <andre...@google.com>, =?utf-8?q?Andrés?= Villegas <andre...@google.com>, =?utf-8?q?Andrés?= Villegas <andre...@google.com>
petrhosek wrote: Could we move functions in [compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h](https://github.com/llvm/llvm-project/blob/231aa0f2120552b474bf86d5ff6721a6c555fdc3/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h) into a class, e.g. `StackTracePrinter`, of which there would be two implementations, e.g. `FormattedStackTracePrinter` and `MarkupStackTracePrinter`. That would eliminate a lot of these cases: ``` if (common_flags()->enable_symbolizer_markup) RenderFooMarkup(...) else RenderFoo(...) ``` Instead we would end up with something like: ``` StackTracePrinter::GetOrInit()->RenderFoo(...) ``` This could be done as two changes. First to introduce the new class and refactor all existing use cases. Second to introduce the markup implementation. Each of these changes should be easier to review than the current patch. https://github.com/llvm/llvm-project/pull/66126 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits