Do not pass DexFile to ClassLinker::Lookup/ResolveString().
The DexFile can be easily retrieved from the DexCache,
so reduce the number of arguments that need to be passed.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I8c4cec43b31b27de7e4e94374fdd69c6d6ca6c13
diff --git a/dex2oat/linker/oat_writer.cc b/dex2oat/linker/oat_writer.cc
index 4be225d..57d02c5 100644
--- a/dex2oat/linker/oat_writer.cc
+++ b/dex2oat/linker/oat_writer.cc
@@ -1964,9 +1964,8 @@
ObjPtr<mirror::String> GetTargetString(const LinkerPatch& patch)
REQUIRES_SHARED(Locks::mutator_lock_) {
ClassLinker* linker = Runtime::Current()->GetClassLinker();
- ObjPtr<mirror::String> string = linker->LookupString(*patch.TargetStringDexFile(),
- patch.TargetStringIndex(),
- GetDexCache(patch.TargetStringDexFile()));
+ ObjPtr<mirror::String> string =
+ linker->LookupString(patch.TargetStringIndex(), GetDexCache(patch.TargetStringDexFile()));
DCHECK(string != nullptr);
DCHECK(writer_->HasBootImage() ||
Runtime::Current()->GetHeap()->ObjectIsInBootImageSpace(string));