aboutsummaryrefslogtreecommitdiff
path: root/lib/AsmParser/llvmAsmParser.cpp.cvs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.cpp.cvs')
-rw-r--r--lib/AsmParser/llvmAsmParser.cpp.cvs6431
1 files changed, 3708 insertions, 2723 deletions
diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs
index 87f9c5f898..13170807cb 100644
--- a/lib/AsmParser/llvmAsmParser.cpp.cvs
+++ b/lib/AsmParser/llvmAsmParser.cpp.cvs
@@ -1,118 +1,278 @@
+/* A Bison parser, made by GNU Bison 2.1. */
-/* A Bison parser, made from /Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y
- by GNU Bison version 1.28 */
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-#define YYBISON 1 /* Identify Bison output. */
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.1"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names. */
#define yyparse llvmAsmparse
-#define yylex llvmAsmlex
+#define yylex llvmAsmlex
#define yyerror llvmAsmerror
-#define yylval llvmAsmlval
-#define yychar llvmAsmchar
+#define yylval llvmAsmlval
+#define yychar llvmAsmchar
#define yydebug llvmAsmdebug
#define yynerrs llvmAsmnerrs
-#define ESINT64VAL 257
-#define EUINT64VAL 258
-#define SINTVAL 259
-#define UINTVAL 260
-#define FPVAL 261
-#define VOID 262
-#define BOOL 263
-#define SBYTE 264
-#define UBYTE 265
-#define SHORT 266
-#define USHORT 267
-#define INT 268
-#define UINT 269
-#define LONG 270
-#define ULONG 271
-#define FLOAT 272
-#define DOUBLE 273
-#define TYPE 274
-#define LABEL 275
-#define VAR_ID 276
-#define LABELSTR 277
-#define STRINGCONSTANT 278
-#define IMPLEMENTATION 279
-#define ZEROINITIALIZER 280
-#define TRUETOK 281
-#define FALSETOK 282
-#define BEGINTOK 283
-#define ENDTOK 284
-#define DECLARE 285
-#define GLOBAL 286
-#define CONSTANT 287
-#define SECTION 288
-#define VOLATILE 289
-#define TO 290
-#define DOTDOTDOT 291
-#define NULL_TOK 292
-#define UNDEF 293
-#define CONST 294
-#define INTERNAL 295
-#define LINKONCE 296
-#define WEAK 297
-#define APPENDING 298
-#define OPAQUE 299
-#define NOT 300
-#define EXTERNAL 301
-#define TARGET 302
-#define TRIPLE 303
-#define ENDIAN 304
-#define POINTERSIZE 305
-#define LITTLE 306
-#define BIG 307
-#define ALIGN 308
-#define DEPLIBS 309
-#define CALL 310
-#define TAIL 311
-#define ASM_TOK 312
-#define MODULE 313
-#define SIDEEFFECT 314
-#define CC_TOK 315
-#define CCC_TOK 316
-#define CSRETCC_TOK 317
-#define FASTCC_TOK 318
-#define COLDCC_TOK 319
-#define RET 320
-#define BR 321
-#define SWITCH 322
-#define INVOKE 323
-#define UNWIND 324
-#define UNREACHABLE 325
-#define ADD 326
-#define SUB 327
-#define MUL 328
-#define DIV 329
-#define REM 330
-#define AND 331
-#define OR 332
-#define XOR 333
-#define SETLE 334
-#define SETGE 335
-#define SETLT 336
-#define SETGT 337
-#define SETEQ 338
-#define SETNE 339
-#define MALLOC 340
-#define ALLOCA 341
-#define FREE 342
-#define LOAD 343
-#define STORE 344
-#define GETELEMENTPTR 345
-#define PHI_TOK 346
-#define CAST 347
-#define SELECT 348
-#define SHL 349
-#define SHR 350
-#define VAARG 351
-#define EXTRACTELEMENT 352
-#define INSERTELEMENT 353
-#define SHUFFLEVECTOR 354
-#define VAARG_old 355
-#define VANEXT_old 356
-
-#line 14 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ESINT64VAL = 258,
+ EUINT64VAL = 259,
+ SINTVAL = 260,
+ UINTVAL = 261,
+ FPVAL = 262,
+ VOID = 263,
+ BOOL = 264,
+ SBYTE = 265,
+ UBYTE = 266,
+ SHORT = 267,
+ USHORT = 268,
+ INT = 269,
+ UINT = 270,
+ LONG = 271,
+ ULONG = 272,
+ FLOAT = 273,
+ DOUBLE = 274,
+ TYPE = 275,
+ LABEL = 276,
+ VAR_ID = 277,
+ LABELSTR = 278,
+ STRINGCONSTANT = 279,
+ IMPLEMENTATION = 280,
+ ZEROINITIALIZER = 281,
+ TRUETOK = 282,
+ FALSETOK = 283,
+ BEGINTOK = 284,
+ ENDTOK = 285,
+ DECLARE = 286,
+ GLOBAL = 287,
+ CONSTANT = 288,
+ SECTION = 289,
+ VOLATILE = 290,
+ TO = 291,
+ DOTDOTDOT = 292,
+ NULL_TOK = 293,
+ UNDEF = 294,
+ CONST = 295,
+ INTERNAL = 296,
+ LINKONCE = 297,
+ WEAK = 298,
+ APPENDING = 299,
+ OPAQUE = 300,
+ NOT = 301,
+ EXTERNAL = 302,
+ TARGET = 303,
+ TRIPLE = 304,
+ ENDIAN = 305,
+ POINTERSIZE = 306,
+ LITTLE = 307,
+ BIG = 308,
+ ALIGN = 309,
+ DEPLIBS = 310,
+ CALL = 311,
+ TAIL = 312,
+ ASM_TOK = 313,
+ MODULE = 314,
+ SIDEEFFECT = 315,
+ CC_TOK = 316,
+ CCC_TOK = 317,
+ CSRETCC_TOK = 318,
+ FASTCC_TOK = 319,
+ COLDCC_TOK = 320,
+ RET = 321,
+ BR = 322,
+ SWITCH = 323,
+ INVOKE = 324,
+ UNWIND = 325,
+ UNREACHABLE = 326,
+ ADD = 327,
+ SUB = 328,
+ MUL = 329,
+ DIV = 330,
+ REM = 331,
+ AND = 332,
+ OR = 333,
+ XOR = 334,
+ SETLE = 335,
+ SETGE = 336,
+ SETLT = 337,
+ SETGT = 338,
+ SETEQ = 339,
+ SETNE = 340,
+ MALLOC = 341,
+ ALLOCA = 342,
+ FREE = 343,
+ LOAD = 344,
+ STORE = 345,
+ GETELEMENTPTR = 346,
+ PHI_TOK = 347,
+ CAST = 348,
+ SELECT = 349,
+ SHL = 350,
+ SHR = 351,
+ VAARG = 352,
+ EXTRACTELEMENT = 353,
+ INSERTELEMENT = 354,
+ SHUFFLEVECTOR = 355,
+ VAARG_old = 356,
+ VANEXT_old = 357
+ };
+#endif
+/* Tokens. */
+#define ESINT64VAL 258
+#define EUINT64VAL 259
+#define SINTVAL 260
+#define UINTVAL 261
+#define FPVAL 262
+#define VOID 263
+#define BOOL 264
+#define SBYTE 265
+#define UBYTE 266
+#define SHORT 267
+#define USHORT 268
+#define INT 269
+#define UINT 270
+#define LONG 271
+#define ULONG 272
+#define FLOAT 273
+#define DOUBLE 274
+#define TYPE 275
+#define LABEL 276
+#define VAR_ID 277
+#define LABELSTR 278
+#define STRINGCONSTANT 279
+#define IMPLEMENTATION 280
+#define ZEROINITIALIZER 281
+#define TRUETOK 282
+#define FALSETOK 283
+#define BEGINTOK 284
+#define ENDTOK 285
+#define DECLARE 286
+#define GLOBAL 287
+#define CONSTANT 288
+#define SECTION 289
+#define VOLATILE 290
+#define TO 291
+#define DOTDOTDOT 292
+#define NULL_TOK 293
+#define UNDEF 294
+#define CONST 295
+#define INTERNAL 296
+#define LINKONCE 297
+#define WEAK 298
+#define APPENDING 299
+#define OPAQUE 300
+#define NOT 301
+#define EXTERNAL 302
+#define TARGET 303
+#define TRIPLE 304
+#define ENDIAN 305
+#define POINTERSIZE 306
+#define LITTLE 307
+#define BIG 308
+#define ALIGN 309
+#define DEPLIBS 310
+#define CALL 311
+#define TAIL 312
+#define ASM_TOK 313
+#define MODULE 314
+#define SIDEEFFECT 315
+#define CC_TOK 316
+#define CCC_TOK 317
+#define CSRETCC_TOK 318
+#define FASTCC_TOK 319
+#define COLDCC_TOK 320
+#define RET 321
+#define BR 322
+#define SWITCH 323
+#define INVOKE 324
+#define UNWIND 325
+#define UNREACHABLE 326
+#define ADD 327
+#define SUB 328
+#define MUL 329
+#define DIV 330
+#define REM 331
+#define AND 332
+#define OR 333
+#define XOR 334
+#define SETLE 335
+#define SETGE 336
+#define SETLT 337
+#define SETGT 338
+#define SETEQ 339
+#define SETNE 340
+#define MALLOC 341
+#define ALLOCA 342
+#define FREE 343
+#define LOAD 344
+#define STORE 345
+#define GETELEMENTPTR 346
+#define PHI_TOK 347
+#define CAST 348
+#define SELECT 349
+#define SHL 350
+#define SHR 351
+#define VAARG 352
+#define EXTRACTELEMENT 353
+#define INSERTELEMENT 354
+#define SHUFFLEVECTOR 355
+#define VAARG_old 356
+#define VANEXT_old 357
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 14 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
#include "ParserInternals.h"
#include "llvm/CallingConv.h"
@@ -129,6 +289,11 @@
#include <list>
#include <utility>
+static bool TriggerError = false;
+#define CHECK_FOR_ERROR { if (TriggerError) { TriggerError = false; YYERROR; } }
+
+#define GEN_ERROR(msg) { GenerateError(msg); YYERROR; }
+
int yyerror(const char *ErrorMsg); // Forward declarations to prevent "implicit
int yylex(); // declaration" of xxx warnings.
int yyparse();
@@ -205,7 +370,7 @@ static struct PerModuleInfo {
UndefinedReferences += " " + I->first.first->getDescription() + " " +
I->first.second.getName() + "\n";
}
- ThrowException(UndefinedReferences);
+ GenerateError(UndefinedReferences);
}
// Look for intrinsic functions and CallInst that need to be upgraded
@@ -262,7 +427,7 @@ static struct PerFunctionInfo {
// Any forward referenced blocks left?
if (!BBForwardRefs.empty())
- ThrowException("Undefined reference to label " +
+ GenerateError("Undefined reference to label " +
BBForwardRefs.begin()->first->getName());
// Resolve all forward references now.
@@ -305,7 +470,7 @@ static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) {
}
break;
default:
- ThrowException("Internal parser error: Invalid symbol type reference!");
+ GenerateError("Internal parser error: Invalid symbol type reference!");
}
// If we reached here, we referenced either a symbol that we don't know about
@@ -317,9 +482,9 @@ static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) {
if (inFunctionScope()) {
if (D.Type == ValID::NameVal)
- ThrowException("Reference to an undefined type: '" + D.getName() + "'");
+ GenerateError("Reference to an undefined type: '" + D.getName() + "'");
else
- ThrowException("Reference to an undefined type: #" + itostr(D.Num));
+ GenerateError("Reference to an undefined type: #" + itostr(D.Num));
}
std::map<ValID, PATypeHolder>::iterator I =CurModule.LateResolveTypes.find(D);
@@ -344,7 +509,7 @@ static Value *lookupInSymbolTable(const Type *Ty, const std::string &Name) {
//
static Value *getValNonImprovising(const Type *Ty, const ValID &D) {
if (isa<FunctionType>(Ty))
- ThrowException("Functions are not values and "
+ GenerateError("Functions are not values and "
"must be referenced as pointers");
switch (D.Type) {
@@ -381,7 +546,7 @@ static Value *getValNonImprovising(const Type *Ty, const ValID &D) {
// value will fit into the specified type...
case ValID::ConstSIntVal: // Is it a constant pool reference??
if (!ConstantSInt::isValueValidForType(Ty, D.ConstPool64))
- ThrowException("Signed integral constant '" +
+ GenerateError("Signed integral constant '" +
itostr(D.ConstPool64) + "' is invalid for type '" +
Ty->getDescription() + "'!");
return ConstantSInt::get(Ty, D.ConstPool64);
@@ -389,7 +554,7 @@ static Value *getValNonImprovising(const Type *Ty, const ValID &D) {
case ValID::ConstUIntVal: // Is it an unsigned const pool reference?
if (!ConstantUInt::isValueValidForType(Ty, D.UConstPool64)) {
if (!ConstantSInt::isValueValidForType(Ty, D.ConstPool64)) {
- ThrowException("Integral constant '" + utostr(D.UConstPool64) +
+ GenerateError("Integral constant '" + utostr(D.UConstPool64) +
"' is invalid or out of range!");
} else { // This is really a signed reference. Transmogrify.
return ConstantSInt::get(Ty, D.ConstPool64);
@@ -400,12 +565,12 @@ static Value *getValNonImprovising(const Type *Ty, const ValID &D) {
case ValID::ConstFPVal: // Is it a floating point const pool reference?
if (!ConstantFP::isValueValidForType(Ty, D.ConstPoolFP))
- ThrowException("FP constant invalid for type!!");
+ GenerateError("FP constant invalid for type!!");
return ConstantFP::get(Ty, D.ConstPoolFP);
case ValID::ConstNullVal: // Is it a null value?
if (!isa<PointerType>(Ty))
- ThrowException("Cannot create a a non pointer null!");
+ GenerateError("Cannot create a a non pointer null!");
return ConstantPointerNull::get(cast<PointerType>(Ty));
case ValID::ConstUndefVal: // Is it an undef value?
@@ -416,7 +581,7 @@ static Value *getValNonImprovising(const Type *Ty, const ValID &D) {
case ValID::ConstantVal: // Fully resolved constant?
if (D.ConstantValue->getType() != Ty)
- ThrowException("Constant expression type different from required type!");
+ GenerateError("Constant expression type different from required type!");
return D.ConstantValue;
case ValID::InlineAsmVal: { // Inline asm expression
@@ -424,7 +589,7 @@ static Value *getValNonImprovising(const Type *Ty, const ValID &D) {
const FunctionType *FTy =
PTy ? dyn_cast<FunctionType>(PTy->getElementType()) : 0;
if (!FTy || !InlineAsm::Verify(FTy, D.IAD->Constraints))
- ThrowException("Invalid type for asm constraint string!");
+ GenerateError("Invalid type for asm constraint string!");
InlineAsm *IA = InlineAsm::get(FTy, D.IAD->AsmString, D.IAD->Constraints,
D.IAD->HasSideEffects);
D.destroy(); // Free InlineAsmDescriptor.
@@ -447,14 +612,14 @@ static Value *getValNonImprovising(const Type *Ty, const ValID &D) {
//
static Value *getVal(const Type *Ty, const ValID &ID) {
if (Ty == Type::LabelTy)
- ThrowException("Cannot use a basic block here");
+ GenerateError("Cannot use a basic block here");
// See if the value has already been defined.
Value *V = getValNonImprovising(Ty, ID);
if (V) return V;
if (!Ty->isFirstClassType() && !isa<OpaqueType>(Ty))
- ThrowException("Invalid use of a composite type!");
+ GenerateError("Invalid use of a composite type!");
// If we reached here, we referenced either a symbol that we don't know about
// or an id number that hasn't been read yet. We may be referencing something
@@ -486,7 +651,7 @@ static BasicBlock *getBBVal(const ValID &ID, bool isDefinition = false) {
std::string Name;
BasicBlock *BB = 0;
switch (ID.Type) {
- default: ThrowException("Illegal label reference " + ID.getName());
+ default: GenerateError("Illegal label reference " + ID.getName());
case ValID::NumberVal: // Is it a numbered definition?
if (unsigned(ID.Num) >= CurFun.NumberedBlocks.size())
CurFun.NumberedBlocks.resize(ID.Num+1);
@@ -507,7 +672,7 @@ static BasicBlock *getBBVal(const ValID &ID, bool isDefinition = false) {
// an entry for it in the PlaceHolderInfo map.
if (isDefinition && !CurFun.BBForwardRefs.erase(BB))
// The existing value was a definition, not a forward reference.
- ThrowException("Redefinition of label " + ID.getName());
+ GenerateError("Redefinition of label " + ID.getName());
ID.destroy(); // Free strdup'd memory.
return BB;
@@ -581,11 +746,11 @@ ResolveDefinitions(std::map<const Type*,ValueList> &LateResolvers,
InsertValue(V, *FutureLateResolvers);
} else {
if (DID.Type == ValID::NameVal)
- ThrowException("Reference to an invalid definition: '" +DID.getName()+
+ GenerateError("Reference to an invalid definition: '" +DID.getName()+
"' of type '" + V->getType()->getDescription() + "'",
PHI->second.second);
else
- ThrowException("Reference to an invalid definition: #" +
+ GenerateError("Reference to an invalid definition: #" +
itostr(DID.Num) + " of type '" +
V->getType()->getDescription() + "'",
PHI->second.second);
@@ -623,12 +788,12 @@ static void setValueName(Value *V, char *NameStr) {
free(NameStr); // Free old string
if (V->getType() == Type::VoidTy)
- ThrowException("Can't assign name '" + Name+"' to value with void type!");
+ GenerateError("Can't assign name '" + Name+"' to value with void type!");
assert(inFunctionScope() && "Must be in function scope!");
SymbolTable &ST = CurFun.CurrentFunction->getSymbolTable();
if (ST.lookup(V->getType(), Name))
- ThrowException("Redefinition of value named '" + Name + "' in the '" +
+ GenerateError("Redefinition of value named '" + Name + "' in the '" +
V->getType()->getDescription() + "' type plane!");
// Set the name.
@@ -643,7 +808,7 @@ ParseGlobalVariable(char *NameStr,GlobalValue::LinkageTypes Linkage,
bool isConstantGlobal, const Type *Ty,
Constant *Initializer) {
if (isa<FunctionType>(Ty))
- ThrowException("Cannot declare global vars of function type!");
+ GenerateError("Cannot declare global vars of function type!");
const PointerType *PTy = PointerType::get(Ty);
@@ -700,7 +865,7 @@ ParseGlobalVariable(char *NameStr,GlobalValue::LinkageTypes Linkage,
return EGV;
}
- ThrowException("Redefinition of global variable named '" + Name +
+ GenerateError("Redefinition of global variable named '" + Name +
"' in the '" + Ty->getDescription() + "' type plane!");
}
}
@@ -729,7 +894,7 @@ static bool setTypeName(const Type *T, char *NameStr) {
// We don't allow assigning names to void type
if (T == Type::VoidTy)
- ThrowException("Can't assign name '" + Name + "' to the void type!");
+ GenerateError("Can't assign name '" + Name + "' to the void type!");
// Set the type name, checking for conflicts as we do so.
bool AlreadyExists = CurModule.CurrentModule->addTypeName(Name, T);
@@ -753,7 +918,7 @@ static bool setTypeName(const Type *T, char *NameStr) {
if (Existing == T) return true; // Yes, it's equal.
// Any other kind of (non-equivalent) redefinition is an error.
- ThrowException("Redefinition of type named '" + Name + "' in the '" +
+ GenerateError("Redefinition of type named '" + Name + "' in the '" +
T->getDescription() + "' type plane!");
}
@@ -859,6 +1024,8 @@ static PATypeHolder HandleUpRefs(const Type *ty) {
CurModule.CurrentModule = M;
yyparse(); // Parse the file, potentially throwing exception
+ if (!ParserResult)
+ return 0;
Module *Result = ParserResult;
ParserResult = 0;
@@ -875,12 +1042,12 @@ static PATypeHolder HandleUpRefs(const Type *ty) {
}
if (ObsoleteVarArgs && NewVarArgs)
- ThrowException("This file is corrupt: it uses both new and old style varargs");
+ GenerateError("This file is corrupt: it uses both new and old style varargs");
if(ObsoleteVarArgs) {
if(Function* F = Result->getNamedFunction("llvm.va_start")) {
if (F->arg_size() != 0)
- ThrowException("Obsolete va_start takes 0 argument!");
+ GenerateError("Obsolete va_start takes 0 argument!");
//foo = va_start()
// ->
@@ -907,7 +1074,7 @@ static PATypeHolder HandleUpRefs(const Type *ty) {
if(Function* F = Result->getNamedFunction("llvm.va_end")) {
if(F->arg_size() != 1)
- ThrowException("Obsolete va_end takes 1 argument!");
+ GenerateError("Obsolete va_end takes 1 argument!");
//vaend foo
// ->
@@ -931,7 +1098,7 @@ static PATypeHolder HandleUpRefs(const Type *ty) {
if(Function* F = Result->getNamedFunction("llvm.va_copy")) {
if(F->arg_size() != 1)
- ThrowException("Obsolete va_copy takes 1 argument!");
+ GenerateError("Obsolete va_copy takes 1 argument!");
//foo = vacopy(bar)
// ->
//a = alloca 1 of typeof(foo)
@@ -988,8 +1155,28 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
}
-#line 890 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-typedef union {
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 897 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
std::pair<llvm::PATypeHolder*, char*> *ArgVal;
@@ -1028,971 +1215,1424 @@ typedef union {
llvm::Instruction::OtherOps OtherOpVal;
llvm::Module::Endianness Endianness;
} YYSTYPE;
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
+/* Line 196 of yacc.c. */
+#line 1220 "llvmAsmParser.tab.c"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-#define YYFINAL 496
-#define YYFLAG -32768
-#define YYNTBASE 117
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 356 ? yytranslate[x] : 188)
-
-static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 106,
- 107, 115, 2, 104, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 111,
- 103, 112, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 108, 105, 110, 2, 2, 2, 2, 2, 116, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 109,
- 2, 2, 113, 2, 114, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102
-};
+/* Copy the second part of user declarations. */
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
- 20, 22, 24, 26, 28, 30, 32, 34, 36, 38,
- 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
- 60, 62, 64, 67, 68, 70, 72, 74, 76, 77,
- 78, 80, 82, 84, 86, 89, 90, 93, 94, 98,
- 101, 102, 104, 105, 109, 111, 114, 116, 118, 120,
- 122, 124, 126, 128, 130, 132, 134, 136, 138, 140,
- 142, 144, 146, 148, 150, 152, 154, 156, 159, 164,
- 170, 176, 180, 183, 186, 188, 192, 194, 198, 200,
- 201, 206, 210, 214, 219, 224, 228, 231, 234, 237,
- 240, 243, 246, 249, 252, 255, 258, 265, 271, 280,
- 287, 294, 301, 308, 315, 324, 333, 337, 339, 341,
- 343, 345, 348, 351, 356, 359, 361, 366, 369, 374,
- 375, 383, 384, 392, 396, 401, 402, 404, 406, 408,
- 412, 416, 420, 424, 428, 430, 431, 433, 435, 437,
- 438, 441, 445, 447, 449, 453, 455, 456, 465, 467,
- 469, 473, 475, 477, 480, 481, 485, 486, 488, 490,
- 492, 494, 496, 498, 500, 502, 504, 508, 510, 516,
- 518, 520, 522, 524, 527, 530, 533, 537, 540, 541,
- 543, 546, 549, 553, 563, 573, 582, 596, 598, 600,
- 607, 613, 616, 623, 631, 633, 637, 639, 640, 643,
- 645, 651, 657, 663, 666, 671, 676, 683, 688, 693,
- 698, 703, 710, 717, 720, 728, 730, 733, 734, 736,
- 737, 741, 748, 752, 759, 762, 767, 774
-};
-static const short yyrhs[] = { 5,
- 0, 6, 0, 3, 0, 4, 0, 72, 0, 73,
- 0, 74, 0, 75, 0, 76, 0, 77, 0, 78,
- 0, 79, 0, 80, 0, 81, 0, 82, 0, 83,
- 0, 84, 0, 85, 0, 95, 0, 96, 0, 16,
- 0, 14, 0, 12, 0, 10, 0, 17, 0, 15,
- 0, 13, 0, 11, 0, 123, 0, 124, 0, 18,
- 0, 19, 0, 157, 103, 0, 0, 41, 0, 42,
- 0, 43, 0, 44, 0, 0, 0, 62, 0, 63,
- 0, 64, 0, 65, 0, 61, 4, 0, 0, 54,
- 4, 0, 0, 104, 54, 4, 0, 34, 24, 0,
- 0, 132, 0, 0, 104, 135, 134, 0, 132, 0,
- 54, 4, 0, 138, 0, 8, 0, 140, 0, 8,
- 0, 140, 0, 9, 0, 10, 0, 11, 0, 12,
- 0, 13, 0, 14, 0, 15, 0, 16, 0, 17,
- 0, 18, 0, 19, 0, 20, 0, 21, 0, 45,
- 0, 139, 0, 171, 0, 105, 4, 0, 137, 106,
- 142, 107, 0, 108, 4, 109, 140, 110, 0, 111,
- 4, 109, 140, 112, 0, 113, 141, 114, 0, 113,
- 114, 0, 140, 115, 0, 140, 0, 141, 104, 140,
- 0, 141, 0, 141, 104, 37, 0, 37, 0, 0,
- 138, 108, 145, 110, 0, 138, 108, 110, 0, 138,
- 116, 24, 0, 138, 111, 145, 112, 0, 138, 113,
- 145, 114, 0, 138, 113, 114, 0, 138, 38, 0,
- 138, 39, 0, 138, 171, 0, 138, 144, 0, 138,
- 26, 0, 123, 118, 0, 124, 4, 0, 9, 27,
- 0, 9, 28, 0, 126, 7, 0, 93, 106, 143,
- 36, 138, 107, 0, 91, 106, 143, 185, 107, 0,
- 94, 106, 143, 104, 143, 104, 143, 107, 0, 119,
- 106, 143, 104, 143, 107, 0, 120, 106, 143, 104,
- 143, 107, 0, 121, 106, 143, 104, 143, 107, 0,
- 122, 106, 143, 104, 143, 107, 0, 98, 106, 143,
- 104, 143, 107, 0, 99, 106, 143, 104, 143, 104,
- 143, 107, 0, 100, 106, 143, 104, 143, 104, 143,
- 107, 0, 145, 104, 143, 0, 143, 0, 32, 0,
- 33, 0, 148, 0, 148, 166, 0, 148, 167, 0,
- 148, 59, 58, 152, 0, 148, 25, 0, 149, 0,
- 149, 127, 20, 136, 0, 149, 167, 0, 149, 59,
- 58, 152, 0, 0, 149, 127, 128, 146, 143, 150,
- 134, 0, 0, 149, 127, 47, 146, 138, 151, 134,
- 0, 149, 48, 154, 0, 149, 55, 103, 155, 0,
- 0, 24, 0, 53, 0, 52, 0, 50, 103, 153,
- 0, 51, 103, 4, 0, 49, 103, 24, 0, 108,
- 156, 110, 0, 156, 104, 24, 0, 24, 0, 0,
- 22, 0, 24, 0, 157, 0, 0, 138, 158, 0,
- 160, 104, 159, 0, 159, 0, 160, 0, 160, 104,
- 37, 0, 37, 0, 0, 129, 136, 157, 106, 161,
- 107, 133, 130, 0, 29, 0, 113, 0, 128, 162,
- 163, 0, 30, 0, 114, 0, 174, 165, 0, 0,
- 31, 168, 162, 0, 0, 60, 0, 3, 0, 4,
- 0, 7, 0, 27, 0, 28, 0, 38, 0, 39,
- 0, 26, 0, 111, 145, 112, 0, 144, 0, 58,
- 169, 24, 104, 24, 0, 117, 0, 157, 0, 171,
- 0, 170, 0, 138, 172, 0, 174, 175, 0, 164,
- 175, 0, 176, 127, 177, 0, 176, 179, 0, 0,
- 23, 0, 66, 173, 0, 66, 8, 0, 67, 21,
- 172, 0, 67, 9, 172, 104, 21, 172, 104, 21,
- 172, 0, 68, 125, 172, 104, 21, 172, 108, 178,
- 110, 0, 68, 125, 172, 104, 21, 172, 108, 110,
- 0, 69, 129, 136, 172, 106, 182, 107, 36, 21,
- 172, 70, 21, 172, 0, 70, 0, 71, 0, 178,
- 125, 170, 104, 21, 172, 0, 125, 170, 104, 21,
- 172, 0, 127, 184, 0, 138, 108, 172, 104, 172,
- 110, 0, 180, 104, 108, 172, 104, 172, 110, 0,
- 173, 0, 181, 104, 173, 0, 181, 0, 0, 57,
- 56, 0, 56, 0, 119, 138, 172, 104, 172, 0,
- 120, 138, 172, 104, 172, 0, 121, 138, 172, 104,
- 172, 0, 46, 173, 0, 122, 173, 104, 173, 0,
- 93, 173, 36, 138, 0, 94, 173, 104, 173, 104,
- 173, 0, 97, 173, 104, 138, 0, 101, 173, 104,
- 138, 0, 102, 173, 104, 138, 0, 98, 173, 104,
- 173, 0, 99, 173, 104, 173, 104, 173, 0, 100,
- 173, 104, 173, 104, 173, 0, 92, 180, 0, 183,
- 129, 136, 172, 106, 182, 107, 0, 187, 0, 104,
- 181, 0, 0, 35, 0, 0, 86, 138, 131, 0,
- 86, 138, 104, 15, 172, 131, 0, 87, 138, 131,
- 0, 87, 138, 104, 15, 172, 131, 0, 88, 173,
- 0, 186, 89, 138, 172, 0, 186, 90, 173, 104,
- 138, 172, 0, 91, 138, 172, 185, 0
-};
+/* Line 219 of yacc.c. */
+#line 1232 "llvmAsmParser.tab.c"
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
#endif
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 1010, 1011, 1018, 1019, 1028, 1028, 1028, 1028, 1028, 1029,
- 1029, 1029, 1030, 1030, 1030, 1030, 1030, 1030, 1032, 1032,
- 1036, 1036, 1036, 1036, 1037, 1037, 1037, 1037, 1038, 1038,
- 1039, 1039, 1042, 1045, 1049, 1049, 1050, 1051, 1052, 1055,
- 1055, 1056, 1057, 1058, 1059, 1068, 1068, 1074, 1074, 1082,
- 1089, 1089, 1095, 1095, 1097, 1101, 1114, 1114, 1115, 1115,
- 1117, 1126, 1126, 1126, 1126, 1126, 1126, 1126, 1127, 1127,
- 1127, 1127, 1127, 1127, 1128, 1131, 1134, 1140, 1147, 1159,
- 1163, 1174, 1183, 1186, 1194, 1198, 1203, 1204, 1207, 1210,
- 1220, 1245, 1258, 1287, 1312, 1332, 1344, 1353, 1357, 1416,
- 1422, 1430, 1435, 1440, 1443, 1446, 1453, 1463, 1494, 1501,
- 1522, 1532, 1537, 1544, 1549, 1554, 1562, 1565, 1572, 1572,
- 1582, 1589, 1593, 1596, 1599, 1602, 1615, 1635, 1637, 1639,
- 1642, 1645, 1649, 1652, 1654, 1656, 1660, 1672, 1673, 1675,
- 1678, 1686, 1691, 1693, 1697, 1701, 1709, 1709, 1710, 1710,
- 1712, 1718, 1723, 1729, 1732, 1737, 1741, 1745, 1831, 1831,
- 1833, 1841, 1841, 1843, 1847, 1847, 1856, 1859, 1863, 1866,
- 1869, 1872, 1875, 1878, 1881, 1884, 1887, 1911, 1914, 1927,
- 1930, 1935, 1935, 1941, 1945, 1948, 1956, 1965, 1969, 1979,
- 1990, 1993, 1996, 1999, 2002, 2016, 2020, 2073, 2076, 2082,
- 2090, 2100, 2107, 2112, 2119, 2123, 2129, 2129, 2131, 2134,
- 2140, 2152, 2163, 2173, 2185, 2192, 2199, 2206, 2211, 2230,
- 2252, 2257, 2262, 2267, 2281, 2338, 2344, 2346, 2350, 2353,
- 2359, 2363, 2367, 2371, 2375, 2382, 2392, 2405
-};
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
#endif
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYINCLUDED_STDLIB_H
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifdef __cplusplus
+}
+# endif
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short int yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \