diff options
author | Vladimir Marko <vmarko@google.com> | 2018-04-04 17:23:28 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2018-04-04 17:23:28 +0000 |
commit | 5806a9ec99b5494b511e84c74f494f0b3a8ebec5 (patch) | |
tree | bb50d00ff0890c2e10f351f462b47b56b01e78ea /compiler/optimizing/codegen_test_utils.h | |
parent | c9dd2207dfdab42586b1d6a5e7f11cf2fcea3a7a (diff) |
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
Diffstat (limited to 'compiler/optimizing/codegen_test_utils.h')
-rw-r--r-- | compiler/optimizing/codegen_test_utils.h | 8 |
1 files changed, 3 insertions, 5 deletions
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<const uint8_t> GetMemory() const OVERRIDE { - return ArrayRef<const uint8_t>(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<fptr>(reinterpret_cast<uintptr_t>(allocator.GetMemory().data())); + CommonCompilerTest::MakeExecutable(allocator.GetMemory(), allocator.GetSize()); + fptr f = reinterpret_cast<fptr>(allocator.GetMemory()); if (target_isa == InstructionSet::kThumb2) { // For thumb we need the bottom bit set. f = reinterpret_cast<fptr>(reinterpret_cast<uintptr_t>(f) + 1); |