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/compiler/optimizing/sharpening.cc b/compiler/optimizing/sharpening.cc
index 64092d3..1e49411 100644
--- a/compiler/optimizing/sharpening.cc
+++ b/compiler/optimizing/sharpening.cc
@@ -262,7 +262,7 @@
       // Compiling boot image. Resolve the string and allocate it if needed, to ensure
       // the string will be added to the boot image.
       DCHECK(!runtime->UseJitCompilation());
-      string = class_linker->ResolveString(dex_file, string_index, dex_cache);
+      string = class_linker->ResolveString(string_index, dex_cache);
       CHECK(string != nullptr);
       if (compiler_driver->GetSupportBootImageFixup()) {
         DCHECK(ContainsElement(compiler_driver->GetDexFilesForOatFile(), &dex_file));
@@ -273,7 +273,7 @@
       }
     } else if (runtime->UseJitCompilation()) {
       DCHECK(!codegen->GetCompilerOptions().GetCompilePic());
-      string = class_linker->LookupString(dex_file, string_index, dex_cache.Get());
+      string = class_linker->LookupString(string_index, dex_cache.Get());
       if (string != nullptr) {
         if (runtime->GetHeap()->ObjectIsInBootImageSpace(string)) {
           desired_load_kind = HLoadString::LoadKind::kBootImageAddress;
@@ -285,7 +285,7 @@
       }
     } else {
       // AOT app compilation. Try to lookup the string without allocating if not found.
-      string = class_linker->LookupString(dex_file, string_index, dex_cache.Get());
+      string = class_linker->LookupString(string_index, dex_cache.Get());
       if (string != nullptr && runtime->GetHeap()->ObjectIsInBootImageSpace(string)) {
         if (codegen->GetCompilerOptions().GetCompilePic()) {
           desired_load_kind = HLoadString::LoadKind::kBootImageInternTable;