diff options
author | 2015-07-31 17:35:52 -0700 | |
---|---|---|
committer | 2015-07-31 17:35:52 -0700 | |
commit | a315f5c546b796f55f4872bb6efc15eb858d9639 (patch) | |
tree | 188bcbab728423d79147fd9d9da45c2539371ac5 /compiler/oat_test.cc | |
parent | bc1d78daa463572c5a770cdca858a3b51d8e1b7b (diff) |
cleanup: Replace pointers with out-parameters and fix-up formatting
Cleans all of oat_file.h/.cc, parsed_options.h./cc, runtime.h/.cc
Other files are touched only incidentally to use outof(x) instead of &x.
Change-Id: I0bb15111149d53bb21aac2199ef33bd35333b0ca
Diffstat (limited to 'compiler/oat_test.cc')
-rw-r--r-- | compiler/oat_test.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc index 88dc29e6ab..05a33d7a7f 100644 --- a/compiler/oat_test.cc +++ b/compiler/oat_test.cc @@ -16,6 +16,7 @@ #include "arch/instruction_set_features.h" #include "art_method-inl.h" +#include "base/out.h" #include "class_linker.h" #include "common_compiler_test.h" #include "compiled_method.h" @@ -83,7 +84,7 @@ TEST_F(OatTest, WriteRead) { std::string error_msg; std::unique_ptr<const InstructionSetFeatures> insn_features( - InstructionSetFeatures::FromVariant(insn_set, "default", &error_msg)); + InstructionSetFeatures::FromVariant(insn_set, "default", outof(error_msg))); ASSERT_TRUE(insn_features.get() != nullptr) << error_msg; compiler_options_.reset(new CompilerOptions); verification_results_.reset(new VerificationResults(compiler_options_.get())); @@ -123,7 +124,7 @@ TEST_F(OatTest, WriteRead) { compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), &timings); } std::unique_ptr<OatFile> oat_file(OatFile::Open(tmp.GetFilename(), tmp.GetFilename(), nullptr, - nullptr, false, nullptr, &error_msg)); + nullptr, false, nullptr, outof(error_msg))); ASSERT_TRUE(oat_file.get() != nullptr) << error_msg; const OatHeader& oat_header = oat_file->GetOatHeader(); ASSERT_TRUE(oat_header.IsValid()); @@ -190,7 +191,7 @@ TEST_F(OatTest, OatHeaderIsValid) { InstructionSet insn_set = kX86; std::string error_msg; std::unique_ptr<const InstructionSetFeatures> insn_features( - InstructionSetFeatures::FromVariant(insn_set, "default", &error_msg)); + InstructionSetFeatures::FromVariant(insn_set, "default", outof(error_msg))); ASSERT_TRUE(insn_features.get() != nullptr) << error_msg; std::vector<const DexFile*> dex_files; uint32_t image_file_location_oat_checksum = 0; |