summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatEntity.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-12 04:51:55 +0000
committerZachary Turner <zturner@google.com>2017-05-12 04:51:55 +0000
commit97206d572797bddc1bba71bb1c18c97f19d69053 (patch)
treefdf21d24485672cf97c800264d135b9d5d2ecdce /lldb/source/Core/FormatEntity.cpp
parent3086b45a2fae833e8419885e78c598d936cc6429 (diff)
downloadbcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.tar.gz
bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.zip
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list. A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious. llvm-svn: 302872
Diffstat (limited to 'lldb/source/Core/FormatEntity.cpp')
-rw-r--r--lldb/source/Core/FormatEntity.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index 835a1c54a0e..05f986978e5 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -303,7 +303,7 @@ void FormatEntity::Entry::AppendText(const char *cstr) {
return AppendText(llvm::StringRef(cstr));
}
-Error FormatEntity::Parse(const llvm::StringRef &format_str, Entry &entry) {
+Status FormatEntity::Parse(const llvm::StringRef &format_str, Entry &entry) {
entry.Clear();
entry.type = Entry::Type::Root;
llvm::StringRef modifiable_format(format_str);
@@ -408,7 +408,7 @@ static bool RunScriptFormatKeyword(Stream &s, const SymbolContext *sc,
ScriptInterpreter *script_interpreter =
target->GetDebugger().GetCommandInterpreter().GetScriptInterpreter();
if (script_interpreter) {
- Error error;
+ Status error;
std::string script_output;
if (script_interpreter->RunScriptFormatKeyword(script_function_name, t,
@@ -778,7 +778,7 @@ static bool DumpValue(Stream &s, const SymbolContext *sc,
var_name_final_if_array_range, index_lower,
index_higher);
- Error error;
+ Status error;
const std::string &expr_path = entry.string;
@@ -824,7 +824,7 @@ static bool DumpValue(Stream &s, const SymbolContext *sc,
// this happens when we are not going through
// GetValueForVariableExpressionPath
// to get to the target ValueObject
- Error error;
+ Status error;
target = target->Dereference(error).get();
if (error.Fail()) {
if (log)
@@ -1079,7 +1079,7 @@ bool FormatEntity::FormatStringRef(const llvm::StringRef &format_str, Stream &s,
bool initial_function) {
if (!format_str.empty()) {
FormatEntity::Entry root;
- Error error = FormatEntity::Parse(format_str, root);
+ Status error = FormatEntity::Parse(format_str, root);
if (error.Success()) {
return FormatEntity::Format(root, s, sc, exe_ctx, addr, valobj,
function_changed, initial_function);
@@ -1096,7 +1096,7 @@ bool FormatEntity::FormatCString(const char *format, Stream &s,
if (format && format[0]) {
FormatEntity::Entry root;
llvm::StringRef format_str(format);
- Error error = FormatEntity::Parse(format_str, root);
+ Status error = FormatEntity::Parse(format_str, root);
if (error.Success()) {
return FormatEntity::Format(root, s, sc, exe_ctx, addr, valobj,
function_changed, initial_function);
@@ -1866,10 +1866,10 @@ static bool DumpCommaSeparatedChildEntryNames(
return false;
}
-static Error ParseEntry(const llvm::StringRef &format_str,
- const FormatEntity::Entry::Definition *parent,
- FormatEntity::Entry &entry) {
- Error error;
+static Status ParseEntry(const llvm::StringRef &format_str,
+ const FormatEntity::Entry::Definition *parent,
+ FormatEntity::Entry &entry) {
+ Status error;
const size_t sep_pos = format_str.find_first_of(".[:");
const char sep_char =
@@ -1956,7 +1956,7 @@ static const FormatEntity::Entry::Definition *
FindEntry(const llvm::StringRef &format_str,
const FormatEntity::Entry::Definition *parent,
llvm::StringRef &remainder) {
- Error error;
+ Status error;
std::pair<llvm::StringRef, llvm::StringRef> p = format_str.split('.');
const size_t n = parent->num_children;
@@ -1983,9 +1983,9 @@ FindEntry(const llvm::StringRef &format_str,
return parent;
}
-Error FormatEntity::ParseInternal(llvm::StringRef &format, Entry &parent_entry,
- uint32_t depth) {
- Error error;
+Status FormatEntity::ParseInternal(llvm::StringRef &format, Entry &parent_entry,
+ uint32_t depth) {
+ Status error;
while (!format.empty() && error.Success()) {
const size_t non_special_chars = format.find_first_of("${}\\");
@@ -2279,10 +2279,10 @@ Error FormatEntity::ParseInternal(llvm::StringRef &format, Entry &parent_entry,
return error;
}
-Error FormatEntity::ExtractVariableInfo(llvm::StringRef &format_str,
- llvm::StringRef &variable_name,
- llvm::StringRef &variable_format) {
- Error error;
+Status FormatEntity::ExtractVariableInfo(llvm::StringRef &format_str,
+ llvm::StringRef &variable_name,
+ llvm::StringRef &variable_format) {
+ Status error;
variable_name = llvm::StringRef();
variable_format = llvm::StringRef();
OpenPOWER on IntegriCloud