summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-10-28 23:41:49 +0000
committerAlexey Samsonov <samsonov@google.com>2013-10-28 23:41:49 +0000
commit6faff4886a3059a8cda08f015d29a6c9a0a4de3c (patch)
treeb053da16d95ba9281bcfb868b049df1009f01f41 /unittests
parent1765daa21c51a3e6bfc7db4adbbcbac0e0dcff3e (diff)
downloadllvm-6faff4886a3059a8cda08f015d29a6c9a0a4de3c.tar.gz
llvm-6faff4886a3059a8cda08f015d29a6c9a0a4de3c.tar.bz2
llvm-6faff4886a3059a8cda08f015d29a6c9a0a4de3c.tar.xz
DWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast() interface. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/DebugInfo/DWARFFormValueTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/DebugInfo/DWARFFormValueTest.cpp b/unittests/DebugInfo/DWARFFormValueTest.cpp
index e7216b3726..36cbae2645 100644
--- a/unittests/DebugInfo/DWARFFormValueTest.cpp
+++ b/unittests/DebugInfo/DWARFFormValueTest.cpp
@@ -18,14 +18,14 @@ namespace {
TEST(DWARFFormValue, FixedFormSizes) {
// Size of DW_FORM_addr and DW_FORM_ref_addr are equal in DWARF2,
// DW_FORM_ref_addr is always 4 bytes in DWARF32 starting from DWARF3.
- const uint8_t *sizes = DWARFFormValue::getFixedFormSizes(4, 2);
+ ArrayRef<uint8_t> sizes = DWARFFormValue::getFixedFormSizes(4, 2);
EXPECT_EQ(sizes[DW_FORM_addr], sizes[DW_FORM_ref_addr]);
sizes = DWARFFormValue::getFixedFormSizes(8, 2);
EXPECT_EQ(sizes[DW_FORM_addr], sizes[DW_FORM_ref_addr]);
sizes = DWARFFormValue::getFixedFormSizes(8, 3);
EXPECT_EQ(4, sizes[DW_FORM_ref_addr]);
// Check that we don't have fixed form sizes for weird address sizes.
- EXPECT_EQ(0, DWARFFormValue::getFixedFormSizes(16, 2));
+ EXPECT_EQ(0U, DWARFFormValue::getFixedFormSizes(16, 2).size());
}
bool isFormClass(uint16_t Form, DWARFFormValue::FormClass FC) {