summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r--llvm/lib/AsmParser/LLParser.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index 7802a1e489b..b03fe52d507 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -173,7 +173,14 @@ namespace llvm {
bool ParseOptionalAlignment(unsigned &Alignment);
bool ParseOptionalCustomMetadata();
bool ParseOptionalInfo(unsigned &Alignment);
- bool ParseIndexList(SmallVectorImpl<unsigned> &Indices);
+ bool ParseIndexList(SmallVectorImpl<unsigned> &Indices,bool &AteExtraComma);
+ bool ParseIndexList(SmallVectorImpl<unsigned> &Indices) {
+ bool AteExtraComma;
+ if (ParseIndexList(Indices, AteExtraComma)) return true;
+ if (AteExtraComma)
+ return TokError("expected index");
+ return false;
+ }
// Top-Level Entities
bool ParseTopLevelEntities();
OpenPOWER on IntegriCloud