[Lldb-commits] [lldb] bbcb343 - [lldb] Avoid format string in LLDB_SCOPED_TIMER

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue May 25 17:14:18 PDT 2021


Author: Jonas Devlieghere
Date: 2021-05-25T17:14:08-07:00
New Revision: bbcb3433d4e8f5fa385b14e74d4314bd5409022d

URL: https://github.com/llvm/llvm-project/commit/bbcb3433d4e8f5fa385b14e74d4314bd5409022d
DIFF: https://github.com/llvm/llvm-project/commit/bbcb3433d4e8f5fa385b14e74d4314bd5409022d.diff

LOG: [lldb] Avoid format string in LLDB_SCOPED_TIMER

Pass LLVM_PRETTY_FUNCTION directly for the no-argument macro.

Added: 
    

Modified: 
    lldb/include/lldb/Utility/Timer.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Utility/Timer.h b/lldb/include/lldb/Utility/Timer.h
index 32422b34b1ad..edc064b23b57 100644
--- a/lldb/include/lldb/Utility/Timer.h
+++ b/lldb/include/lldb/Utility/Timer.h
@@ -76,7 +76,7 @@ class Timer {
 
 #define LLDB_SCOPED_TIMER()                                                    \
   static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION);           \
-  ::lldb_private::Timer _scoped_timer(_cat, "%s", LLVM_PRETTY_FUNCTION)
+  ::lldb_private::Timer _scoped_timer(_cat, LLVM_PRETTY_FUNCTION)
 #define LLDB_SCOPED_TIMERF(...)                                                \
   static ::lldb_private::Timer::Category _cat(LLVM_PRETTY_FUNCTION);           \
   ::lldb_private::Timer _scoped_timer(_cat, __VA_ARGS__)


        


More information about the lldb-commits mailing list