From eb18e81992ffaae9b6a0564eb24532505b8d0f68 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 19 May 2006 21:28:34 +0000 Subject: [PATCH] Add support for parsing csret llvm-svn: 28406 --- lib/AsmParser/Lexer.l | 1 + lib/AsmParser/llvmAsmParser.y | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index f9306096847..dc94cca2325 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -218,6 +218,7 @@ sideeffect { return SIDEEFFECT; } cc { return CC_TOK; } ccc { return CCC_TOK; } +csretcc { return CSRETCC_TOK; } fastcc { return FASTCC_TOK; } coldcc { return COLDCC_TOK; } diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index cf746007a20..927b1203d1b 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -981,7 +981,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) { %token TO DOTDOTDOT NULL_TOK UNDEF CONST INTERNAL LINKONCE WEAK APPENDING %token OPAQUE NOT EXTERNAL TARGET TRIPLE ENDIAN POINTERSIZE LITTLE BIG ALIGN %token DEPLIBS CALL TAIL ASM_TOK MODULE SIDEEFFECT -%token CC_TOK CCC_TOK FASTCC_TOK COLDCC_TOK +%token CC_TOK CCC_TOK CSRETCC_TOK FASTCC_TOK COLDCC_TOK %type OptCallingConv // Basic Block Terminating Operators @@ -1054,6 +1054,7 @@ OptLinkage : INTERNAL { $$ = GlobalValue::InternalLinkage; } | OptCallingConv : /*empty*/ { $$ = CallingConv::C; } | CCC_TOK { $$ = CallingConv::C; } | + CSRETCC_TOK { $$ = CallingConv::CSRet; } | FASTCC_TOK { $$ = CallingConv::Fast; } | COLDCC_TOK { $$ = CallingConv::Cold; } | CC_TOK EUINT64VAL {