aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp38
1 files changed, 10 insertions, 28 deletions
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 10ff5aa72b52..d6de65809c18 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
@@ -17,7 +17,6 @@
#include "lldb/DataFormatters/DumpValueObjectOptions.h"
#include "lldb/Expression/UserExpression.h"
#include "lldb/Host/OptionParser.h"
-#include "lldb/Host/StringConvert.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandObjectMultiword.h"
#include "lldb/Interpreter/CommandReturnObject.h"
@@ -967,11 +966,6 @@ void RenderScriptRuntime::Terminate() {
PluginManager::UnregisterPlugin(CreateInstance);
}
-lldb_private::ConstString RenderScriptRuntime::GetPluginNameStatic() {
- static ConstString plugin_name("renderscript");
- return plugin_name;
-}
-
RenderScriptRuntime::ModuleKind
RenderScriptRuntime::GetModuleKind(const lldb::ModuleSP &module_sp) {
if (module_sp) {
@@ -1014,13 +1008,6 @@ void RenderScriptRuntime::ModulesDidLoad(const ModuleList &module_list) {
}
}
-// PluginInterface protocol
-lldb_private::ConstString RenderScriptRuntime::GetPluginName() {
- return GetPluginNameStatic();
-}
-
-uint32_t RenderScriptRuntime::GetPluginVersion() { return 1; }
-
bool RenderScriptRuntime::GetDynamicTypeAndAddress(
ValueObject &in_value, lldb::DynamicValueType use_dynamic,
TypeAndOrName &class_type_or_name, Address &address,
@@ -2660,7 +2647,7 @@ bool RenderScriptRuntime::SaveAllocation(Stream &strm, const uint32_t alloc_id,
FileSpec file_spec(path);
FileSystem::Instance().Resolve(file_spec);
auto file = FileSystem::Instance().Open(
- file_spec, File::eOpenOptionWrite | File::eOpenOptionCanCreate |
+ file_spec, File::eOpenOptionWriteOnly | File::eOpenOptionCanCreate |
File::eOpenOptionTruncate);
if (!file) {
@@ -4568,10 +4555,8 @@ public:
eLanguageTypeExtRenderScript));
const char *id_cstr = command.GetArgumentAtIndex(0);
- bool success = false;
- const uint32_t id =
- StringConvert::ToUInt32(id_cstr, UINT32_MAX, 0, &success);
- if (!success) {
+ uint32_t id;
+ if (!llvm::to_integer(id_cstr, id)) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
return false;
@@ -4585,8 +4570,9 @@ public:
if (outfile_spec) {
// Open output file
std::string path = outfile_spec.GetPath();
- auto file = FileSystem::Instance().Open(
- outfile_spec, File::eOpenOptionWrite | File::eOpenOptionCanCreate);
+ auto file = FileSystem::Instance().Open(outfile_spec,
+ File::eOpenOptionWriteOnly |
+ File::eOpenOptionCanCreate);
if (file) {
output_stream_storage =
std::make_unique<StreamFile>(std::move(file.get()));
@@ -4714,10 +4700,8 @@ public:
eLanguageTypeExtRenderScript));
const char *id_cstr = command.GetArgumentAtIndex(0);
- bool success = false;
- const uint32_t id =
- StringConvert::ToUInt32(id_cstr, UINT32_MAX, 0, &success);
- if (!success) {
+ uint32_t id;
+ if (!llvm::to_integer(id_cstr, id)) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
return false;
@@ -4763,10 +4747,8 @@ public:
eLanguageTypeExtRenderScript));
const char *id_cstr = command.GetArgumentAtIndex(0);
- bool success = false;
- const uint32_t id =
- StringConvert::ToUInt32(id_cstr, UINT32_MAX, 0, &success);
- if (!success) {
+ uint32_t id;
+ if (!llvm::to_integer(id_cstr, id)) {
result.AppendErrorWithFormat("invalid allocation id argument '%s'",
id_cstr);
return false;