[Lldb-commits] [lldb] r255090 - When printing warnings, the repeat_key should be

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 8 17:25:01 PST 2015


Author: spyffe
Date: Tue Dec  8 19:25:01 2015
New Revision: 255090

URL: http://llvm.org/viewvc/llvm-project?rev=255090&view=rev
Log:
When printing warnings, the repeat_key should be
const void * because the data is never accessed,
the pointer is the only useful piece of data.

Modified:
    lldb/trunk/include/lldb/Target/Process.h
    lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=255090&r1=255089&r2=255090&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Tue Dec  8 19:25:01 2015
@@ -3201,7 +3201,7 @@ protected:
     ///     printf style format string
     //------------------------------------------------------------------
     void
-    PrintWarning (uint64_t warning_type, void *repeat_key, const char *fmt, ...) __attribute__((format(printf, 4, 5)));
+    PrintWarning (uint64_t warning_type, const void *repeat_key, const char *fmt, ...) __attribute__((format(printf, 4, 5)));
     
     //------------------------------------------------------------------
     // NextEventAction provides a way to register an action on the next
@@ -3286,7 +3286,7 @@ protected:
     // Type definitions
     //------------------------------------------------------------------
     typedef std::map<lldb::LanguageType, lldb::LanguageRuntimeSP> LanguageRuntimeCollection;
-    typedef std::unordered_set<void *> WarningsPointerSet;
+    typedef std::unordered_set<const void *> WarningsPointerSet;
     typedef std::map<uint64_t, WarningsPointerSet> WarningsCollection;
 
     struct PreResumeCallbackAndBaton

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=255090&r1=255089&r2=255090&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Dec  8 19:25:01 2015
@@ -6400,7 +6400,7 @@ Process::ModulesDidLoad (ModuleList &mod
 }
 
 void
-Process::PrintWarning (uint64_t warning_type, void *repeat_key, const char *fmt, ...)
+Process::PrintWarning (uint64_t warning_type, const void *repeat_key, const char *fmt, ...)
 {
     bool print_warning = true;
 




More information about the lldb-commits mailing list