diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 4faf70cf8eb..e02f3065c07 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -668,7 +668,7 @@ Module *RunVMAsmParser(const string &Filename, FILE *F) { %token FLOAT DOUBLE TYPE LABEL %token VAR_ID LABELSTR STRINGCONSTANT -%type OptVAR_ID OptAssign +%type OptVAR_ID OptAssign FuncName %token IMPLEMENTATION TRUE FALSE BEGINTOK ENDTOK DECLARE GLOBAL CONSTANT UNINIT @@ -1136,7 +1136,9 @@ ArgList : ArgListH { $$ = 0; } -FunctionHeaderH : OptInternal TypesV STRINGCONSTANT '(' ArgList ')' { +FuncName : VAR_ID | STRINGCONSTANT; + +FunctionHeaderH : OptInternal TypesV FuncName '(' ArgList ')' { UnEscapeLexed($3); string FunctionName($3);