summaryrefslogtreecommitdiff
path: root/compiler/exception_test.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2018-06-20 10:39:31 -0700
committer Andreas Gampe <agampe@google.com> 2018-06-20 10:40:56 -0700
commitb68ed2c708a5a3fcc8c2cec944c1080a6fbb88f5 (patch)
treedabb0134bd5f27ee99628a7eafe65b2b6212934c /compiler/exception_test.cc
parent2e639002351545a76b0dbb2fbcb33c988d2d786e (diff)
ART: Ensure OatQuickMethodHeader is trivially copyable
Remove empty constructor. Test: mmma art Change-Id: Ie58721299a6675797e9a525f4eb7e6df82abed50
Diffstat (limited to 'compiler/exception_test.cc')
-rw-r--r--compiler/exception_test.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/exception_test.cc b/compiler/exception_test.cc
index 15c07870a1..8235be943b 100644
--- a/compiler/exception_test.cc
+++ b/compiler/exception_test.cc
@@ -15,6 +15,7 @@
*/
#include <memory>
+#include <type_traits>
#include "base/arena_allocator.h"
#include "base/callee_save_type.h"
@@ -92,6 +93,7 @@ class ExceptionTest : public CommonRuntimeTest {
MemoryRegion stack_maps_region(&fake_header_code_and_maps_[0], stack_maps_size);
stack_maps.FillInCodeInfo(stack_maps_region);
OatQuickMethodHeader method_header(code_offset, 0u, 4 * sizeof(void*), 0u, 0u, code_size);
+ static_assert(std::is_trivially_copyable<OatQuickMethodHeader>::value, "Cannot use memcpy");
memcpy(&fake_header_code_and_maps_[code_offset - header_size], &method_header, header_size);
std::copy(fake_code_.begin(),
fake_code_.end(),