diff options
Diffstat (limited to 'compiler/jit/jit_compiler.cc')
-rw-r--r-- | compiler/jit/jit_compiler.cc | 16 |
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; } |