From 5806a9ec99b5494b511e84c74f494f0b3a8ebec5 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 4 Apr 2018 17:23:28 +0000 Subject: Revert "Compile link-time thunks in codegen." Reason for revert: This caused clang linker crash in several branches. Bug: 77581732 This reverts commit c9dd2207dfdab42586b1d6a5e7f11cf2fcea3a7a. Change-Id: I1923809083cf41c4f19e3e60df03ae80517aaedb --- compiler/optimizing/codegen_test_utils.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/codegen_test_utils.h') diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h index 792cfb539a..c41c290c8b 100644 --- a/compiler/optimizing/codegen_test_utils.h +++ b/compiler/optimizing/codegen_test_utils.h @@ -195,9 +195,7 @@ class InternalCodeAllocator : public CodeAllocator { } size_t GetSize() const { return size_; } - ArrayRef GetMemory() const OVERRIDE { - return ArrayRef(memory_.get(), size_); - } + uint8_t* GetMemory() const { return memory_.get(); } private: size_t size_; @@ -271,8 +269,8 @@ static void Run(const InternalCodeAllocator& allocator, InstructionSet target_isa = codegen.GetInstructionSet(); typedef Expected (*fptr)(); - CommonCompilerTest::MakeExecutable(allocator.GetMemory().data(), allocator.GetMemory().size()); - fptr f = reinterpret_cast(reinterpret_cast(allocator.GetMemory().data())); + CommonCompilerTest::MakeExecutable(allocator.GetMemory(), allocator.GetSize()); + fptr f = reinterpret_cast(allocator.GetMemory()); if (target_isa == InstructionSet::kThumb2) { // For thumb we need the bottom bit set. f = reinterpret_cast(reinterpret_cast(f) + 1); -- cgit v1.2.3