aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-08-22 19:00:43 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-11-13 20:39:49 +0000
commitfe6060f10f634930ff71b7c50291ddc610da2475 (patch)
tree1483580c790bd4d27b6500a7542b5ee00534d3cc /contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime
parentb61bce17f346d79cecfd8f195a64b10f77be43b1 (diff)
parent344a3780b2e33f6ca763666c380202b18aab72a3 (diff)
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime')
-rw-r--r--contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp2
-rw-r--r--contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp29
-rw-r--r--contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h4
3 files changed, 10 insertions, 25 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp b/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp
index 6858c7134d33..08a752eaa888 100644
--- a/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp
+++ b/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp
@@ -185,7 +185,7 @@ RSIRPasses::RSIRPasses(Process *process) {
EarlyPasses->add(new RenderScriptRuntimeModulePass(process));
}
-RSIRPasses::~RSIRPasses() {}
+RSIRPasses::~RSIRPasses() = default;
} // namespace lldb_renderscript
} // namespace lldb_private
diff --git a/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
index dd9312234d8b..10ff5aa72b52 100644
--- a/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
+++ b/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -61,7 +61,7 @@ namespace {
template <typename type_t> class empirical_type {
public:
// Ctor. Contents is invalid when constructed.
- empirical_type() : valid(false) {}
+ empirical_type() = default;
// Return true and copy contents to out if valid, else return false.
bool get(type_t &out) const {
@@ -99,7 +99,7 @@ public:
}
protected:
- bool valid;
+ bool valid = false;
type_t data;
};
@@ -2228,7 +2228,7 @@ bool RenderScriptRuntime::RefreshAllocation(AllocationDetails *alloc,
return JITAllocationSize(alloc, frame_ptr);
}
-// Function attempts to set the type_name member of the paramaterised Element
+// Function attempts to set the type_name member of the parameterised Element
// object. This string should be the name of the struct type the Element
// represents. We need this string for pretty printing the Element to users.
void RenderScriptRuntime::FindStructTypeName(Element &elem,
@@ -4087,9 +4087,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions()
- : Options(),
- m_kernel_types(RSReduceBreakpointResolver::eKernelTypeAll) {}
+ CommandOptions() : Options() {}
~CommandOptions() override = default;
@@ -4175,7 +4173,7 @@ public:
return true;
}
- int m_kernel_types;
+ int m_kernel_types = RSReduceBreakpointResolver::eKernelTypeAll;
llvm::StringRef m_reduce_name;
RSCoordinate m_coord;
bool m_have_coord;
@@ -4189,7 +4187,6 @@ public:
result.AppendErrorWithFormat("'%s' takes 1 argument of reduction name, "
"and an optional kernel type list",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4203,7 +4200,6 @@ public:
auto coord = m_options.m_have_coord ? &m_options.m_coord : nullptr;
if (!runtime->PlaceBreakpointOnReduction(target, outstream, name, coord,
m_options.m_kernel_types)) {
- result.SetStatus(eReturnStatusFailed);
result.AppendError("Error: unable to place breakpoint on reduction");
return false;
}
@@ -4291,7 +4287,6 @@ public:
result.AppendErrorWithFormat(
"'%s' takes 1 argument of kernel name, and an optional coordinate.",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4304,7 +4299,6 @@ public:
auto name = command.GetArgumentAtIndex(0);
auto coord = m_options.m_have_coord ? &m_options.m_coord : nullptr;
if (!runtime->PlaceBreakpointOnKernel(target, outstream, name, coord)) {
- result.SetStatus(eReturnStatusFailed);
result.AppendErrorWithFormat(
"Error: unable to set breakpoint on kernel '%s'", name);
return false;
@@ -4342,7 +4336,6 @@ public:
if (argc != 1) {
result.AppendErrorWithFormat(
"'%s' takes 1 argument of 'enable' or 'disable'", m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4361,7 +4354,6 @@ public:
} else {
result.AppendErrorWithFormat(
"Argument must be either 'enable' or 'disable'");
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4568,7 +4560,6 @@ public:
result.AppendErrorWithFormat("'%s' takes 1 argument, an allocation ID. "
"As well as an optional -f argument",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4583,7 +4574,6 @@ public:
if (!success) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4608,7 +4598,6 @@ public:
std::string error = llvm::toString(file.takeError());
result.AppendErrorWithFormat("Couldn't open file '%s': %s",
path.c_str(), error.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
} else
@@ -4653,7 +4642,7 @@ public:
class CommandOptions : public Options {
public:
- CommandOptions() : Options(), m_id(0) {}
+ CommandOptions() : Options() {}
~CommandOptions() override = default;
@@ -4681,7 +4670,7 @@ public:
return llvm::makeArrayRef(g_renderscript_runtime_alloc_list_options);
}
- uint32_t m_id;
+ uint32_t m_id = 0;
};
bool DoExecute(Args &command, CommandReturnObject &result) override {
@@ -4717,7 +4706,6 @@ public:
result.AppendErrorWithFormat(
"'%s' takes 2 arguments, an allocation ID and filename to read from.",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4732,7 +4720,6 @@ public:
if (!success) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4768,7 +4755,6 @@ public:
result.AppendErrorWithFormat(
"'%s' takes 2 arguments, an allocation ID and filename to read from.",
m_cmd_name.c_str());
- result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -4783,7 +4769,6 @@ public:
if (!success) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
- result.SetStatus(eReturnStatusFailed);
return false;
}
diff --git a/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
index 5e3726548369..2785c3b08125 100644
--- a/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -44,9 +44,9 @@ typedef std::shared_ptr<RSKernelDescriptor> RSKernelDescriptorSP;
typedef std::shared_ptr<RSScriptGroupDescriptor> RSScriptGroupDescriptorSP;
struct RSCoordinate {
- uint32_t x, y, z;
+ uint32_t x = 0, y = 0, z = 0;
- RSCoordinate() : x(), y(), z(){};
+ RSCoordinate() = default;
bool operator==(const lldb_renderscript::RSCoordinate &rhs) {
return x == rhs.x && y == rhs.y && z == rhs.z;