summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-30 05:14:00 +0000
committerChris Lattner <sabre@nondot.org>2009-12-30 05:14:00 +0000
commit28f1eebe3e10c1457d1bc65b5cad8bd53744c08c (patch)
tree127f2d0221e5ab49c0ed5cf9234bef172c7f6e6f /llvm/lib/AsmParser/LLParser.h
parentbafee45d2c9641a5d15b4d744276096b9d9cfeb9 (diff)
downloadbcm5719-llvm-28f1eebe3e10c1457d1bc65b5cad8bd53744c08c.tar.gz
bcm5719-llvm-28f1eebe3e10c1457d1bc65b5cad8bd53744c08c.zip
reimplement insertvalue/extractvalue metadata handling to not blindly
accept invalid input. Actually add a testcase. llvm-svn: 92297
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