diff options
Diffstat (limited to 'src/utils.cc')
| -rw-r--r-- | src/utils.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils.cc b/src/utils.cc index bc51c2a254..4f4cd8fc44 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -514,6 +514,14 @@ std::string GetArtCacheOrDie() { 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). |