summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-18 23:17:51 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-18 23:17:51 +0000
commit5c9a17732bf07b2de850bd03e64c1dfa4030a50f (patch)
tree902d7e8be001b1062d1b119d62fca51aa87ca631 /llvm/lib/AsmParser
parent7bb0738d825d0f8e0e3f36f945e9ae47c9b904f0 (diff)
downloadbcm5719-llvm-5c9a17732bf07b2de850bd03e64c1dfa4030a50f.tar.gz
bcm5719-llvm-5c9a17732bf07b2de850bd03e64c1dfa4030a50f.zip
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. llvm-svn: 229769
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 76365ea2233..0d748610742 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -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
OpenPOWER on IntegriCloud