mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-11 21:57:55 +00:00
Make the %"..." syntax legal for local name. This just makes it symmetric
with global names which can already be @"..." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37257 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a2b18de4ba
commit
aa7c2f8c03
@ -161,6 +161,7 @@ QuoteLabel \"[^\"]+\":
|
||||
/* Quoted names can contain any character except " and \ */
|
||||
StringConstant \"[^\"]*\"
|
||||
AtStringConstant @\"[^\"]*\"
|
||||
PctStringConstant %\"[^\"]*\"
|
||||
|
||||
/* LocalVarID/GlobalVarID: match an unnamed local variable slot ID. */
|
||||
LocalVarID %[0-9]+
|
||||
@ -366,6 +367,11 @@ shufflevector { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
|
||||
return ATSTRINGCONSTANT;
|
||||
}
|
||||
|
||||
{PctStringConstant} {
|
||||
yytext[strlen(yytext)-1] = 0; // nuke end quote
|
||||
llvmAsmlval.StrVal = strdup(yytext+2); // Nuke @, quote
|
||||
return PCTSTRINGCONSTANT;
|
||||
}
|
||||
{PInteger} { int len = strlen(yytext);
|
||||
uint32_t numBits = ((len * 64) / 19) + 1;
|
||||
APInt Tmp(numBits, yytext, len, 10);
|
||||
|
@ -1051,7 +1051,8 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
|
||||
%token <PrimType> FLOAT DOUBLE LABEL
|
||||
%token TYPE
|
||||
|
||||
%token<StrVal> LOCALVAR GLOBALVAR LABELSTR STRINGCONSTANT ATSTRINGCONSTANT
|
||||
%token<StrVal> LOCALVAR GLOBALVAR LABELSTR
|
||||
%token<StrVal> STRINGCONSTANT ATSTRINGCONSTANT PCTSTRINGCONSTANT
|
||||
%type <StrVal> LocalName OptLocalName OptLocalAssign
|
||||
%type <StrVal> GlobalName OptGlobalAssign GlobalAssign
|
||||
%type <UIntVal> OptAlign OptCAlign
|
||||
@ -1138,7 +1139,7 @@ FPredicates
|
||||
IntType : INTTYPE;
|
||||
FPType : FLOAT | DOUBLE;
|
||||
|
||||
LocalName : LOCALVAR | STRINGCONSTANT;
|
||||
LocalName : LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT
|
||||
OptLocalName : LocalName | /*empty*/ { $$ = 0; };
|
||||
|
||||
/// OptLocalAssign - Value producing statements have an optional assignment
|
||||
|
Loading…
Reference in New Issue
Block a user