diff options
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 7cf74dd16f5..8eede0a72eb 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -8027,12 +8027,18 @@ bool LLParser::ParseConstVCallList( } /// ConstVCall -/// ::= VFuncId, Args +/// ::= '(' VFuncId ',' Args ')' bool LLParser::ParseConstVCall(FunctionSummary::ConstVCall &ConstVCall, IdToIndexMapType &IdToIndexMap, unsigned Index) { - if (ParseVFuncId(ConstVCall.VFunc, IdToIndexMap, Index) || - ParseToken(lltok::comma, "expected ',' here") || - ParseArgs(ConstVCall.Args)) + if (ParseToken(lltok::lparen, "expected '(' here") || + ParseVFuncId(ConstVCall.VFunc, IdToIndexMap, Index)) + return true; + + if (EatIfPresent(lltok::comma)) + if (ParseArgs(ConstVCall.Args)) + return true; + + if (ParseToken(lltok::rparen, "expected ')' here")) return true; return false; |