[lldb] Silence GCC warnings about format not being a string literal in LLDB_SCOPED_TIMER
Pass "%s" as the format string literal and LLVM_PRETTY_FUNCTION as
argument to it.
Differential Revision: https://reviews.llvm.org/D99120
GitOrigin-RevId: 2f18e51d8b9e02d689efc522a0784caed5b5a386
diff --git a/include/lldb/Utility/Timer.h b/include/lldb/Utility/Timer.h
index edc064b..32422b3 100644
--- a/include/lldb/Utility/Timer.h
+++ b/include/lldb/Utility/Timer.h
@@ -76,7 +76,7 @@
#define LLDB_SCOPED_TIMER() \
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
- ::lldb_private::Timer _scoped_timer(_cat, LLVM_PRETTY_FUNCTION)
+ ::lldb_private::Timer _scoped_timer(_cat, "%s", LLVM_PRETTY_FUNCTION)
#define LLDB_SCOPED_TIMERF(...) \
static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION); \
::lldb_private::Timer _scoped_timer(_cat, __VA_ARGS__)