mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
IR: Allow MDSubrange to have 'count: -1'
It turns out that `count: -1` is a special value indicating an empty array, such as `Values` in: struct T { unsigned Count; int Values[]; }; Handle it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229769 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -3276,7 +3276,7 @@ bool LLParser::ParseGenericDebugNode(MDNode *&Result, bool IsDistinct) {
|
||||
/// ::= !MDSubrange(count: 30, lowerBound: 2)
|
||||
bool LLParser::ParseMDSubrange(MDNode *&Result, bool IsDistinct) {
|
||||
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
|
||||
REQUIRED(count, MDUnsignedField, (0, UINT64_MAX >> 1)); \
|
||||
REQUIRED(count, MDSignedField, (-1, -1, INT64_MAX)); \
|
||||
OPTIONAL(lowerBound, MDSignedField, );
|
||||
PARSE_MD_FIELDS();
|
||||
#undef VISIT_MD_FIELDS
|
||||
|
Reference in New Issue
Block a user