mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-21 03:05:30 -04:00
[DebugInfoMetadata] Added DIFlags interface in DIBasicType.
Flags in DIBasicType will be used to pass attributes used in DW_TAG_base_type, such as DW_AT_endianity. Patch by Chirag Patel! Differential Revision: https://reviews.llvm.org/D49610 llvm-svn: 339714
This commit is contained in:
@@ -1211,14 +1211,17 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_BASIC_TYPE: {
|
||||
if (Record.size() != 6)
|
||||
if (Record.size() < 6 || Record.size() > 7)
|
||||
return error("Invalid record");
|
||||
|
||||
IsDistinct = Record[0];
|
||||
DINode::DIFlags Flags = (Record.size() > 6) ?
|
||||
static_cast<DINode::DIFlags>(Record[6]) : DINode::FlagZero;
|
||||
|
||||
MetadataList.assignValue(
|
||||
GET_OR_DISTINCT(DIBasicType,
|
||||
(Context, Record[1], getMDString(Record[2]), Record[3],
|
||||
Record[4], Record[5])),
|
||||
Record[4], Record[5], Flags)),
|
||||
NextMetadataNo);
|
||||
NextMetadataNo++;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user