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
This commit is contained in:
Victor Leschuk
2016-10-18 14:31:22 +00:00
parent aff4d141b9
commit 197aa3192d
13 changed files with 120 additions and 116 deletions

View File

@@ -2497,7 +2497,9 @@ std::error_code BitcodeReader::parseMetadata(bool ModuleLevel) {
Metadata *Scope = getDITypeRefOrNull(Record[5]);
Metadata *BaseType = getDITypeRefOrNull(Record[6]);
uint64_t SizeInBits = Record[7];
uint64_t AlignInBits = Record[8];
if (Record[8] > (uint64_t)std::numeric_limits<uint32_t>::max())
return error("Alignment value is too large");
uint32_t AlignInBits = Record[8];
uint64_t OffsetInBits = Record[9];
DINode::DIFlags Flags = static_cast<DINode::DIFlags>(Record[10]);
Metadata *Elements = getMDOrNull(Record[11]);