Support function declarations with either %XXX or "XXX" style for now
authorChris Lattner <sabre@nondot.org>
Wed, 22 May 2002 22:33:00 +0000 (22:33 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 22 May 2002 22:33:00 +0000 (22:33 +0000)
"XXX" style should be considered deprecated, and will hopefully be removed
in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2727 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index 4faf70cf8eb56cdbf6dab8a1fb0dbb70a1c9b6d8..e02f3065c07ee6c43e1e5642c8b0596585cf1152 100644 (file)
@@ -668,7 +668,7 @@ Module *RunVMAsmParser(const string &Filename, FILE *F) {
 %token <PrimType> FLOAT DOUBLE TYPE LABEL
 
 %token <StrVal>     VAR_ID LABELSTR STRINGCONSTANT
-%type  <StrVal>  OptVAR_ID OptAssign
+%type  <StrVal>  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);