summaryrefslogtreecommitdiff
path: root/compiler/jit/jit_compiler.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-02-11 10:27:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-02-11 10:27:11 +0000
commit1e70b89afe0e022ec51210ea0da1e0706e194fd0 (patch)
tree1c2b9d0c52e008795ec122b4b904c85c103b3e31 /compiler/jit/jit_compiler.cc
parent61a9328e807426636d3e29699cd978d4a7a345c0 (diff)
parent6c70224ebd667b52a862f850893f6528af63f3e8 (diff)
Merge changes Id4ffa9f9,I1bb5d05d
* changes: Replace MergeSets() with std::set::merge(). Replace StringPiece with std::string_view.
Diffstat (limited to 'compiler/jit/jit_compiler.cc')
-rw-r--r--compiler/jit/jit_compiler.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 4d7ae9bd1b..2c20b3224e 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -22,7 +22,7 @@
#include "arch/instruction_set_features.h"
#include "art_method-inl.h"
#include "base/logging.h" // For VLOG
-#include "base/stringpiece.h"
+#include "base/string_view_cpp20.h"
#include "base/systrace.h"
#include "base/time_utils.h"
#include "base/timing_logger.h"
@@ -71,19 +71,19 @@ void JitCompiler::ParseCompilerOptions() {
DCHECK_EQ(instruction_set, kRuntimeISA);
}
std::unique_ptr<const InstructionSetFeatures> instruction_set_features;
- for (const StringPiece option : runtime->GetCompilerOptions()) {
+ for (const std::string& option : runtime->GetCompilerOptions()) {
VLOG(compiler) << "JIT compiler option " << option;
std::string error_msg;
- if (option.starts_with("--instruction-set-variant=")) {
- StringPiece str = option.substr(strlen("--instruction-set-variant=")).data();
+ if (StartsWith(option, "--instruction-set-variant=")) {
+ const char* str = option.c_str() + strlen("--instruction-set-variant=");
VLOG(compiler) << "JIT instruction set variant " << str;
instruction_set_features = InstructionSetFeatures::FromVariant(
- instruction_set, str.as_string(), &error_msg);
+ instruction_set, str, &error_msg);
if (instruction_set_features == nullptr) {
LOG(WARNING) << "Error parsing " << option << " message=" << error_msg;
}
- } else if (option.starts_with("--instruction-set-features=")) {
- StringPiece str = option.substr(strlen("--instruction-set-features=")).data();
+ } else if (StartsWith(option, "--instruction-set-features=")) {
+ const char* str = option.c_str() + strlen("--instruction-set-features=");
VLOG(compiler) << "JIT instruction set features " << str;
if (instruction_set_features == nullptr) {
instruction_set_features = InstructionSetFeatures::FromVariant(
@@ -93,7 +93,7 @@ void JitCompiler::ParseCompilerOptions() {
}
}
instruction_set_features =
- instruction_set_features->AddFeaturesFromString(str.as_string(), &error_msg);
+ instruction_set_features->AddFeaturesFromString(str, &error_msg);
if (instruction_set_features == nullptr) {
LOG(WARNING) << "Error parsing " << option << " message=" << error_msg;
}