diff options
Diffstat (limited to 'dex2oat')
| -rw-r--r-- | dex2oat/dex2oat_image_test.cc | 2 | ||||
| -rw-r--r-- | dex2oat/dex2oat_options.cc | 2 | ||||
| -rw-r--r-- | dex2oat/dex2oat_test.cc | 2 | ||||
| -rw-r--r-- | dex2oat/linker/oat_writer.cc | 7 | ||||
| -rw-r--r-- | dex2oat/linker/oat_writer_test.cc | 4 |
5 files changed, 10 insertions, 7 deletions
diff --git a/dex2oat/dex2oat_image_test.cc b/dex2oat/dex2oat_image_test.cc index 708665534a..a02fbf862f 100644 --- a/dex2oat/dex2oat_image_test.cc +++ b/dex2oat/dex2oat_image_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include <regex> // NOLINT [build/c++11] [5] +#include <regex> #include <sstream> #include <string> #include <vector> diff --git a/dex2oat/dex2oat_options.cc b/dex2oat/dex2oat_options.cc index 2cf070155f..7f177b9ff6 100644 --- a/dex2oat/dex2oat_options.cc +++ b/dex2oat/dex2oat_options.cc @@ -43,7 +43,7 @@ struct CmdlineType<InstructionSet> : CmdlineTypeParser<InstructionSet> { // Specify storage for the Dex2oatOptions keys. #define DEX2OAT_OPTIONS_KEY(Type, Name, ...) \ - const Dex2oatArgumentMap::Key<Type> Dex2oatArgumentMap::Name {__VA_ARGS__}; // NOLINT [readability/braces] [4] + const Dex2oatArgumentMap::Key<Type> Dex2oatArgumentMap::Name {__VA_ARGS__}; #include "dex2oat_options.def" #pragma GCC diagnostic push diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc index fdada8f926..bd8583bd41 100644 --- a/dex2oat/dex2oat_test.cc +++ b/dex2oat/dex2oat_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include <regex> // NOLINT [build/c++11] [5] +#include <regex> #include <sstream> #include <string> #include <vector> diff --git a/dex2oat/linker/oat_writer.cc b/dex2oat/linker/oat_writer.cc index d3e920f9a0..663a8896ff 100644 --- a/dex2oat/linker/oat_writer.cc +++ b/dex2oat/linker/oat_writer.cc @@ -1143,7 +1143,6 @@ class OatWriter::LayoutReserveOffsetCodeMethodVisitor : public OrderedMethodVisi uint16_t method_offsets_index_ = method_data.method_offsets_index; size_t class_def_index = method_data.class_def_index; uint32_t access_flags = method_data.access_flags; - const DexFile::CodeItem* code_item = method_data.code_item; bool has_debug_info = method_data.HasDebugInfo(); size_t debug_info_idx = method_data.debug_info_idx; @@ -1244,7 +1243,8 @@ class OatWriter::LayoutReserveOffsetCodeMethodVisitor : public OrderedMethodVisi info.class_def_index = class_def_index; info.dex_method_index = method_ref.index; info.access_flags = access_flags; - info.code_item = code_item; + // For intrinsics emitted by codegen, the code has no relation to the original code item. + info.code_item = compiled_method->IsIntrinsic() ? nullptr : method_data.code_item; info.isa = compiled_method->GetInstructionSet(); info.deduped = deduped; info.is_native_debuggable = native_debuggable_; @@ -1303,6 +1303,9 @@ class OatWriter::LayoutReserveOffsetCodeMethodVisitor : public OrderedMethodVisi if (UNLIKELY(lhs->GetPatches().data() != rhs->GetPatches().data())) { return lhs->GetPatches().data() < rhs->GetPatches().data(); } + if (UNLIKELY(lhs->IsIntrinsic() != rhs->IsIntrinsic())) { + return rhs->IsIntrinsic(); + } return false; } }; diff --git a/dex2oat/linker/oat_writer_test.cc b/dex2oat/linker/oat_writer_test.cc index 022aa1b58c..7509d91677 100644 --- a/dex2oat/linker/oat_writer_test.cc +++ b/dex2oat/linker/oat_writer_test.cc @@ -718,7 +718,7 @@ void OatTest::TestZipFileInput(bool verify) { key_value_store.Put(OatHeader::kImageLocationKey, "test.art"); { // Test using the AddDexFileSource() interface with the zip file. - std::vector<const char*> input_filenames { zip_file.GetFilename().c_str() }; // NOLINT [readability/braces] [4] + std::vector<const char*> input_filenames = { zip_file.GetFilename().c_str() }; ScratchFile oat_file, vdex_file(oat_file, ".vdex"); success = WriteElf(vdex_file.GetFile(), oat_file.GetFile(), input_filenames, @@ -829,7 +829,7 @@ void OatTest::TestZipFileInputWithEmptyDex() { SafeMap<std::string, std::string> key_value_store; key_value_store.Put(OatHeader::kImageLocationKey, "test.art"); - std::vector<const char*> input_filenames { zip_file.GetFilename().c_str() }; // NOLINT [readability/braces] [4] + std::vector<const char*> input_filenames = { zip_file.GetFilename().c_str() }; ScratchFile oat_file, vdex_file(oat_file, ".vdex"); std::unique_ptr<ProfileCompilationInfo> profile_compilation_info(new ProfileCompilationInfo()); success = WriteElf(vdex_file.GetFile(), oat_file.GetFile(), input_filenames, |