diff options
| author | 2018-11-16 09:47:01 +0000 | |
|---|---|---|
| committer | 2018-11-16 09:47:01 +0000 | |
| commit | 671986e1bb82de1e5af97506d08ba343f3854711 (patch) | |
| tree | dd6ac704586de5fad547913fbe9b5cbe4e537bd3 /compiler/driver/compiler_options.h | |
| parent | 25242cc4c4be390e0bf3b113dfdc792c6e25c3be (diff) | |
| parent | 9c4b970db31b234d6c0358802cd14ba4262e4ce6 (diff) | |
Merge "Rewrite image type in CompilerOptions."
Diffstat (limited to 'compiler/driver/compiler_options.h')
| -rw-r--r-- | compiler/driver/compiler_options.h | 17 | 
1 files changed, 9 insertions, 8 deletions
| diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index 2f4e5428ea..12fa251606 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -58,6 +58,12 @@ class CompilerOptions final {    static const size_t kDefaultInlineMaxCodeUnits = 32;    static constexpr size_t kUnsetInlineMaxCodeUnits = -1; +  enum class ImageType : uint8_t { +    kNone,                // JIT or AOT app compilation producing only an oat file but no image. +    kBootImage,           // Creating boot image. +    kAppImage,            // Creating app image. +  }; +    CompilerOptions();    ~CompilerOptions(); @@ -191,7 +197,7 @@ class CompilerOptions final {    // Are we compiling a boot image?    bool IsBootImage() const { -    return boot_image_; +    return image_type_ == ImageType::kBootImage;    }    bool IsBaseline() const { @@ -200,11 +206,7 @@ class CompilerOptions final {    // Are we compiling an app image?    bool IsAppImage() const { -    return app_image_; -  } - -  void DisableAppImage() { -    app_image_ = false; +    return image_type_ == ImageType::kAppImage;    }    // Returns whether we are compiling against a "core" image, which @@ -356,8 +358,7 @@ class CompilerOptions final {    // Must not be empty for real boot image, only for tests pretending to compile boot image.    HashSet<std::string> image_classes_; -  bool boot_image_; -  bool app_image_; +  ImageType image_type_;    bool compiling_with_core_image_;    bool baseline_;    bool debuggable_; |