[Lldb-commits] [lldb] r227952 - Change void* name_token to const void* to address warnings.
Bruce Mitchener
bruce.mitchener at gmail.com
Tue Feb 3 00:01:34 PST 2015
Author: brucem
Date: Tue Feb 3 02:01:34 2015
New Revision: 227952
URL: http://llvm.org/viewvc/llvm-project?rev=227952&view=rev
Log:
Change void* name_token to const void* to address warnings.
Reviewers: granata.enrico, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7337
Modified:
lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h
lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h
lldb/trunk/source/API/SBTypeCategory.cpp
lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h?rev=227952&r1=227951&r2=227952&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h Tue Feb 3 02:01:34 2015
@@ -296,13 +296,13 @@ public:
}
virtual bool
- GenerateTypeScriptFunction (const char* oneliner, std::string& output, void* name_token = NULL)
+ GenerateTypeScriptFunction (const char* oneliner, std::string& output, const void* name_token = NULL)
{
return false;
}
virtual bool
- GenerateTypeScriptFunction (StringList &input, std::string& output, void* name_token = NULL)
+ GenerateTypeScriptFunction (StringList &input, std::string& output, const void* name_token = NULL)
{
return false;
}
@@ -314,13 +314,13 @@ public:
}
virtual bool
- GenerateTypeSynthClass (StringList &input, std::string& output, void* name_token = NULL)
+ GenerateTypeSynthClass (StringList &input, std::string& output, const void* name_token = NULL)
{
return false;
}
virtual bool
- GenerateTypeSynthClass (const char* oneliner, std::string& output, void* name_token = NULL)
+ GenerateTypeSynthClass (const char* oneliner, std::string& output, const void* name_token = NULL)
{
return false;
}
Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h?rev=227952&r1=227951&r2=227952&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h (original)
+++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreterPython.h Tue Feb 3 02:01:34 2015
@@ -65,17 +65,17 @@ public:
ExportFunctionDefinitionToInterpreter (StringList &function_def) override;
bool
- GenerateTypeScriptFunction (StringList &input, std::string& output, void* name_token = NULL) override;
+ GenerateTypeScriptFunction (StringList &input, std::string& output, const void* name_token = NULL) override;
bool
- GenerateTypeSynthClass (StringList &input, std::string& output, void* name_token = NULL) override;
+ GenerateTypeSynthClass (StringList &input, std::string& output, const void* name_token = NULL) override;
bool
- GenerateTypeSynthClass (const char* oneliner, std::string& output, void* name_token = NULL) override;
+ GenerateTypeSynthClass (const char* oneliner, std::string& output, const void* name_token = NULL) override;
// use this if the function code is just a one-liner script
bool
- GenerateTypeScriptFunction (const char* oneliner, std::string& output, void* name_token = NULL) override;
+ GenerateTypeScriptFunction (const char* oneliner, std::string& output, const void* name_token = NULL) override;
bool
GenerateScriptAliasFunction (StringList &input, std::string& output) override;
Modified: lldb/trunk/source/API/SBTypeCategory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeCategory.cpp?rev=227952&r1=227951&r2=227952&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeCategory.cpp (original)
+++ lldb/trunk/source/API/SBTypeCategory.cpp Tue Feb 3 02:01:34 2015
@@ -353,7 +353,7 @@ SBTypeCategory::AddTypeSummary (SBTypeNa
// this should eventually be fixed by deciding a final location in the LLDB object space for formatters
if (summary.IsFunctionCode())
{
- void *name_token = (void*)ConstString(type_name.GetName()).GetCString();
+ const void *name_token = (const void*)ConstString(type_name.GetName()).GetCString();
const char* script = summary.GetData();
StringList input; input.SplitIntoLines(script, strlen(script));
uint32_t num_debuggers = lldb_private::Debugger::GetNumDebuggers();
@@ -461,7 +461,7 @@ SBTypeCategory::AddTypeSynthetic (SBType
// this should eventually be fixed by deciding a final location in the LLDB object space for formatters
if (synth.IsClassCode())
{
- void *name_token = (void*)ConstString(type_name.GetName()).GetCString();
+ const void *name_token = (const void*)ConstString(type_name.GetName()).GetCString();
const char* script = synth.GetData();
StringList input; input.SplitIntoLines(script, strlen(script));
uint32_t num_debuggers = lldb_private::Debugger::GetNumDebuggers();
Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=227952&r1=227951&r2=227952&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Tue Feb 3 02:01:34 2015
@@ -538,7 +538,7 @@ ScriptInterpreterPython::GetSysModuleDic
static std::string
GenerateUniqueName (const char* base_name_wanted,
uint32_t& functions_counter,
- void* name_token = nullptr)
+ const void* name_token = nullptr)
{
StreamString sstr;
@@ -1254,7 +1254,7 @@ ScriptInterpreterPython::GenerateFunctio
}
bool
-ScriptInterpreterPython::GenerateTypeScriptFunction (StringList &user_input, std::string& output, void* name_token)
+ScriptInterpreterPython::GenerateTypeScriptFunction (StringList &user_input, std::string& output, const void* name_token)
{
static uint32_t num_created_functions = 0;
user_input.RemoveBlankLines ();
@@ -1303,7 +1303,7 @@ ScriptInterpreterPython::GenerateScriptA
bool
-ScriptInterpreterPython::GenerateTypeSynthClass (StringList &user_input, std::string &output, void* name_token)
+ScriptInterpreterPython::GenerateTypeSynthClass (StringList &user_input, std::string &output, const void* name_token)
{
static uint32_t num_created_classes = 0;
user_input.RemoveBlankLines ();
@@ -1806,7 +1806,7 @@ ScriptInterpreterPython::CreateSynthetic
}
bool
-ScriptInterpreterPython::GenerateTypeScriptFunction (const char* oneliner, std::string& output, void* name_token)
+ScriptInterpreterPython::GenerateTypeScriptFunction (const char* oneliner, std::string& output, const void* name_token)
{
StringList input;
input.SplitIntoLines(oneliner, strlen(oneliner));
@@ -1814,7 +1814,7 @@ ScriptInterpreterPython::GenerateTypeScr
}
bool
-ScriptInterpreterPython::GenerateTypeSynthClass (const char* oneliner, std::string& output, void* name_token)
+ScriptInterpreterPython::GenerateTypeSynthClass (const char* oneliner, std::string& output, const void* name_token)
{
StringList input;
input.SplitIntoLines(oneliner, strlen(oneliner));
More information about the lldb-commits
mailing list