summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2018-06-21 16:15:42 +0100
committerVladimir Marko <vmarko@google.com>2018-06-25 11:30:07 +0100
commitdc4bccef0ded1c261bf9838def2ef329765a8682 (patch)
treef007ff3f747ae2d1e6a20d9bd9c017b2ce191f1e /compiler/driver/compiler_options.cc
parenteebb821b1adaf2db7662fc1c3ff4e9fcfe59a694 (diff)
Move image_classes_ to CompilerOptions.
Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Ifb30e071d7b39ae939fc3f83d7eba82fd077c7e8
Diffstat (limited to 'compiler/driver/compiler_options.cc')
-rw-r--r--compiler/driver/compiler_options.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc
index 933be4f004..3d37b680ee 100644
--- a/compiler/driver/compiler_options.cc
+++ b/compiler/driver/compiler_options.cc
@@ -37,7 +37,8 @@ CompilerOptions::CompilerOptions()
tiny_method_threshold_(kDefaultTinyMethodThreshold),
num_dex_methods_threshold_(kDefaultNumDexMethodsThreshold),
inline_max_code_units_(kUnsetInlineMaxCodeUnits),
- no_inline_from_(nullptr),
+ no_inline_from_(),
+ image_classes_(),
boot_image_(false),
core_image_(false),
app_image_(false),
@@ -67,8 +68,8 @@ CompilerOptions::CompilerOptions()
}
CompilerOptions::~CompilerOptions() {
- // The destructor looks empty but it destroys a PassManagerOptions object. We keep it here
- // because we don't want to include the PassManagerOptions definition from the header file.
+ // Everything done by member destructors.
+ // The definitions of classes forward-declared in the header have now been #included.
}
namespace {
@@ -129,4 +130,11 @@ bool CompilerOptions::ParseCompilerOptions(const std::vector<std::string>& optio
#pragma GCC diagnostic pop
+bool CompilerOptions::IsImageClass(const char* descriptor) const {
+ // Historical note: We used to hold the set indirectly and there was a distinction between an
+ // empty set and a null, null meaning to include all classes. However, the distiction has been
+ // removed; if we don't have a profile, we treat it as an empty set of classes. b/77340429
+ return image_classes_.find(StringPiece(descriptor)) != image_classes_.end();
+}
+
} // namespace art