Replace StringPiece with std::string_view in HashSet.
Update HashSet comment and related code. Also remove dead
CompilerOptions declarations with StringPiece parameters.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 123750182
Change-Id: I4a39d0e8e0392a414129369c5b304ec4813e9ed5
diff --git a/dex2oat/linker/image_test.h b/dex2oat/linker/image_test.h
index 8c9dfb8..431ab90 100644
--- a/dex2oat/linker/image_test.h
+++ b/dex2oat/linker/image_test.h
@@ -21,6 +21,7 @@
#include <memory>
#include <string>
+#include <string_view>
#include <vector>
#include "android-base/stringprintf.h"
@@ -498,7 +499,7 @@
ObjPtr<mirror::Class> klass = class_linker_->FindSystemClass(soa.Self(), descriptor);
EXPECT_TRUE(klass != nullptr) << descriptor;
uint8_t* raw_klass = reinterpret_cast<uint8_t*>(klass.Ptr());
- if (image_classes.find(StringPiece(descriptor)) == image_classes.end()) {
+ if (image_classes.find(std::string_view(descriptor)) == image_classes.end()) {
EXPECT_TRUE(raw_klass >= image_end || raw_klass < image_begin) << descriptor;
} else {
// Image classes should be located inside the image.