From 197aa3192dd8d25330c23274a0d257c6130e4e09 Mon Sep 17 00:00:00 2001 From: Victor Leschuk Date: Tue, 18 Oct 2016 14:31:22 +0000 Subject: DebugInfo: change alignment type from uint64_t to uint32_t to save space. In futher patches we shall have alignment field added to DIVariable family and switching from uint64_t to uint32_t will save 4 bytes per variable. Differential Revision: https://reviews.llvm.org/D25620 llvm-svn: 284482 --- llvm/unittests/IR/MetadataTest.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'llvm/unittests/IR') diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp index 4213d51ed21..67bd730f7b3 100644 --- a/llvm/unittests/IR/MetadataTest.cpp +++ b/llvm/unittests/IR/MetadataTest.cpp @@ -997,9 +997,9 @@ TEST_F(DIBasicTypeTest, get) { TEST_F(DIBasicTypeTest, getWithLargeValues) { auto *N = DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", - UINT64_MAX, UINT64_MAX - 1, 7); + UINT64_MAX, UINT32_MAX - 1, 7); EXPECT_EQ(UINT64_MAX, N->getSizeInBits()); - EXPECT_EQ(UINT64_MAX - 1, N->getAlignInBits()); + EXPECT_EQ(UINT32_MAX - 1, N->getAlignInBits()); } TEST_F(DIBasicTypeTest, getUnspecified) { @@ -1121,9 +1121,9 @@ TEST_F(DIDerivedTypeTest, getWithLargeValues) { auto *N = DIDerivedType::get( Context, dwarf::DW_TAG_pointer_type, "something", File, 1, Scope, - BaseType, UINT64_MAX, UINT64_MAX - 1, UINT64_MAX - 2, Flags, ExtraData); + BaseType, UINT64_MAX, UINT32_MAX - 1, UINT64_MAX - 2, Flags, ExtraData); EXPECT_EQ(UINT64_MAX, N->getSizeInBits()); - EXPECT_EQ(UINT64_MAX - 1, N->getAlignInBits()); + EXPECT_EQ(UINT32_MAX - 1, N->getAlignInBits()); EXPECT_EQ(UINT64_MAX - 2, N->getOffsetInBits()); } @@ -1137,7 +1137,7 @@ TEST_F(DICompositeTypeTest, get) { DIScope *Scope = getSubprogram(); DIType *BaseType = getCompositeType(); uint64_t SizeInBits = 2; - uint64_t AlignInBits = 3; + uint32_t AlignInBits = 3; uint64_t OffsetInBits = 4; DINode::DIFlags Flags = static_cast(5); MDTuple *Elements = getTuple(); @@ -1257,7 +1257,7 @@ TEST_F(DICompositeTypeTest, getWithLargeValues) { DIScope *Scope = getSubprogram(); DIType *BaseType = getCompositeType(); uint64_t SizeInBits = UINT64_MAX; - uint64_t AlignInBits = UINT64_MAX - 1; + uint32_t AlignInBits = UINT32_MAX - 1; uint64_t OffsetInBits = UINT64_MAX - 2; DINode::DIFlags Flags = static_cast(5); MDTuple *Elements = getTuple(); @@ -1283,7 +1283,7 @@ TEST_F(DICompositeTypeTest, replaceOperands) { DIScope *Scope = getSubprogram(); DIType *BaseType = getCompositeType(); uint64_t SizeInBits = 2; - uint64_t AlignInBits = 3; + uint32_t AlignInBits = 3; uint64_t OffsetInBits = 4; DINode::DIFlags Flags = static_cast(5); unsigned RuntimeLang = 6; -- cgit v1.2.3