Add oatopt drop in replacement for dexopt

Change-Id: I094375230af2d9a88e30245b390cac71be7b50f4
diff --git a/src/utils.cc b/src/utils.cc
index bc51c2a..4f4cd8f 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -514,6 +514,14 @@
   return art_cache;
 }
 
+std::string GetArtCacheOatFilenameOrDie(const std::string& location) {
+  std::string art_cache = GetArtCacheOrDie();
+  CHECK_EQ(location[0], '/');
+  std::string cache_file(location, 1); // skip leading slash
+  std::replace(cache_file.begin(), cache_file.end(), '/', '@');
+  return art_cache + "/" + cache_file;
+}
+
 }  // namespace art
 
 // Neither bionic nor glibc exposes gettid(2).