From a315f5c546b796f55f4872bb6efc15eb858d9639 Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Fri, 31 Jul 2015 17:35:52 -0700 Subject: 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 --- compiler/oat_test.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compiler/oat_test.cc') 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 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 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 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 dex_files; uint32_t image_file_location_oat_checksum = 0; -- cgit v1.2.3-59-g8ed1b