summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2022-03-23 08:25:33 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-04-06 15:09:46 +0000
commitf4bd5debf74ee5473756b4cbd71fadb3506e653b (patch)
tree115bb605fbd66a90d0c3ff12cc196fd4ebdca528 /compiler/driver/compiler_options.h
parent6a1d9b9106183d829fd17e81cce345d1ef81f034 (diff)
Touch up changes related to cross-dex compiling
* Added exaplanatory comments * Used IsBootStrapClassLoaded to avoid a read barrier * Use the new multi-image from CompilerOptions Bug: 154012332 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I10a4ed0f9d5b2e796102846564a54dc90f297068
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r--compiler/driver/compiler_options.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 0034306fdf..1bffdb11ed 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -26,6 +26,7 @@
#include "base/globals.h"
#include "base/hash_set.h"
#include "base/macros.h"
+#include "base/stl_util.h"
#include "base/utils.h"
#include "optimizing/register_allocator.h"
@@ -377,9 +378,9 @@ class CompilerOptions final {
return initialize_app_image_classes_;
}
+ // Returns true if `dex_file` is within an oat file we're producing right now.
bool WithinOatFile(const DexFile* dex_file) const {
- return std::find(GetDexFilesForOatFile().begin(), GetDexFilesForOatFile().end(), dex_file) !=
- GetDexFilesForOatFile().end();
+ return ContainsElement(GetDexFilesForOatFile(), dex_file);
}
private: