summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/Symbol/ClangASTType.h1
-rw-r--r--lldb/source/Core/Debugger.cpp12
2 files changed, 7 insertions, 6 deletions
diff --git a/lldb/include/lldb/Symbol/ClangASTType.h b/lldb/include/lldb/Symbol/ClangASTType.h
index 86bef932843..9aa78fd713a 100644
--- a/lldb/include/lldb/Symbol/ClangASTType.h
+++ b/lldb/include/lldb/Symbol/ClangASTType.h
@@ -10,6 +10,7 @@
#ifndef liblldb_ClangASTType_h_
#define liblldb_ClangASTType_h_
+#include <string>
#include "lldb/lldb-private.h"
#include "lldb/Core/ClangForward.h"
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 39ac87abc62..21d45cde1da 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -803,7 +803,7 @@ Debugger::FormatPrompt
)
{
const char* var_name_final;
- char* close_bracket_position = NULL;
+ const char* close_bracket_position = NULL;
const char* percent_position = NULL;
const char* targetvalue;
lldb::Format custom_format = eFormatInvalid;
@@ -842,7 +842,7 @@ Debugger::FormatPrompt
{
// TODO: pick a way to say "all entries". this will make more sense once
// regex typenames are in place. now, you need to be size-aware anyways
- char* separator_position = ::strchr(open_bracket_position,'-'); // might be NULL if this is a simple var[N] bitfield
+ const char* separator_position = ::strchr(open_bracket_position,'-'); // might be NULL if this is a simple var[N] bitfield
close_bracket_position = ::strchr(open_bracket_position,']');
// as usual, we assume that [] will come before %
//printf("trying to expand a []\n");
@@ -1121,8 +1121,8 @@ Debugger::FormatPrompt
const char* open_bracket_position = ::strchr(var_name_begin,'[');
if(open_bracket_position && open_bracket_position < var_name_final)
{
- char* separator_position = ::strchr(open_bracket_position,'-'); // might be NULL if this is a simple var[N] bitfield
- char* close_bracket_position = ::strchr(open_bracket_position,']');
+ const char* separator_position = ::strchr(open_bracket_position,'-'); // might be NULL if this is a simple var[N] bitfield
+ const char* close_bracket_position = ::strchr(open_bracket_position,']');
// as usual, we assume that [] will come before %
//printf("trying to expand a []\n");
var_name_final = open_bracket_position;
@@ -1191,8 +1191,8 @@ Debugger::FormatPrompt
const char* open_bracket_position = ::strchr(var_name_begin,'[');
if(open_bracket_position && open_bracket_position < var_name_final)
{
- char* separator_position = ::strchr(open_bracket_position,'-'); // might be NULL if this is a simple var[N] bitfield
- char* close_bracket_position = ::strchr(open_bracket_position,']');
+ const char* separator_position = ::strchr(open_bracket_position,'-'); // might be NULL if this is a simple var[N] bitfield
+ const char* close_bracket_position = ::strchr(open_bracket_position,']');
// as usual, we assume that [] will come before %
//printf("trying to expand a []\n");
var_name_final = open_bracket_position;
OpenPOWER on IntegriCloud