aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/ProgrammersManual.html2
-rw-r--r--include/llvm/Bytecode/BytecodeHandler.h6
-rw-r--r--include/llvm/Constants.h28
-rw-r--r--include/llvm/DerivedTypes.h34
-rw-r--r--include/llvm/Instructions.h14
-rw-r--r--include/llvm/Intrinsics.td18
-rw-r--r--include/llvm/Target/TargetLowering.h8
-rw-r--r--include/llvm/Transforms/Scalar.h2
-rw-r--r--include/llvm/Type.h6
-rw-r--r--include/llvm/Value.h2
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp6
-rw-r--r--lib/Analysis/ConstantFolding.cpp4
-rw-r--r--lib/AsmParser/llvmAsmParser.cpp.cvs7038
-rw-r--r--lib/AsmParser/llvmAsmParser.h.cvs439
-rw-r--r--lib/AsmParser/llvmAsmParser.y30
-rw-r--r--lib/AsmParser/llvmAsmParser.y.cvs30
-rw-r--r--lib/Bytecode/Reader/Analyzer.cpp4
-rw-r--r--lib/Bytecode/Reader/Reader.cpp20
-rw-r--r--lib/Bytecode/Writer/Writer.cpp8
-rw-r--r--lib/CodeGen/AsmPrinter.cpp4
-rw-r--r--lib/CodeGen/MachOWriter.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp58
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp6
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp2
-rw-r--r--lib/Linker/LinkModules.cpp4
-rw-r--r--lib/Target/CBackend/CBackend.cpp18
-rw-r--r--lib/Target/TargetData.cpp6
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp6
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp62
-rw-r--r--lib/Transforms/Scalar/LowerPacked.cpp38
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp2
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp8
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp28
-rw-r--r--lib/Transforms/Utils/ValueMapper.cpp4
-rw-r--r--lib/VMCore/AsmWriter.cpp8
-rw-r--r--lib/VMCore/ConstantFold.cpp66
-rw-r--r--lib/VMCore/Constants.cpp78
-rw-r--r--lib/VMCore/Instructions.cpp62
-rw-r--r--lib/VMCore/Type.cpp62
-rw-r--r--lib/VMCore/ValueTypes.cpp18
-rw-r--r--lib/VMCore/Verifier.cpp12
-rw-r--r--test/Transforms/SCCP/2006-12-04-PackedType.ll4
-rw-r--r--tools/llvm-upgrade/UpgradeParser.cpp.cvs7259
-rw-r--r--tools/llvm-upgrade/UpgradeParser.h.cvs499
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y44
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y.cvs44
-rw-r--r--tools/llvm2cpp/CppWriter.cpp16
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp6
49 files changed, 9166 insertions, 6961 deletions
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html
index 5393d7f..a96a676 100644
--- a/docs/ProgrammersManual.html
+++ b/docs/ProgrammersManual.html
@@ -2314,7 +2314,7 @@ the <tt>lib/VMCore</tt> directory.</p>
</dd>
<dt><tt>PointerType</tt></dt>
<dd>Subclass of SequentialType for pointer types.</dd>
- <dt><tt>PackedType</tt></dt>
+ <dt><tt>VectorType</tt></dt>
<dd>Subclass of SequentialType for packed (vector) types. A
packed type is similar to an ArrayType but is distinguished because it is
a first class type wherease ArrayType is not. Packed types are used for
diff --git a/include/llvm/Bytecode/BytecodeHandler.h b/include/llvm/Bytecode/BytecodeHandler.h
index 4084efa..eeae2a5 100644
--- a/include/llvm/Bytecode/BytecodeHandler.h
+++ b/include/llvm/Bytecode/BytecodeHandler.h
@@ -23,7 +23,7 @@ namespace llvm {
class ArrayType;
class StructType;
class PointerType;
-class PackedType;
+class VectorType;
class ConstantArray;
class Module;
@@ -242,8 +242,8 @@ public:
) {}
/// @brief Handle a constant packed
- virtual void handleConstantPacked(
- const PackedType* PT, ///< Type of the array
+ virtual void handleConstantVector(
+ const VectorType* PT, ///< Type of the array
Constant**ElementSlots, unsigned NumElts,///< Slot nums for packed values
unsigned TypeSlot, ///< Slot # of type
Constant* Val ///< The constant value
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 3d4ff90..e01e2a2 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -28,7 +28,7 @@ namespace llvm {
class ArrayType;
class StructType;
class PointerType;
-class PackedType;
+class VectorType;
template<class ConstantClass, class TypeClass, class ValType>
struct ConstantCreator;
@@ -334,31 +334,31 @@ public:
};
//===----------------------------------------------------------------------===//
-/// ConstantPacked - Constant Packed Declarations
+/// ConstantVector - Constant Vector Declarations
///
-class ConstantPacked : public Constant {
- friend struct ConstantCreator<ConstantPacked, PackedType,
+class ConstantVector : public Constant {
+ friend struct ConstantCreator<ConstantVector, VectorType,
std::vector<Constant*> >;
- ConstantPacked(const ConstantPacked &); // DO NOT IMPLEMENT
+ ConstantVector(const ConstantVector &); // DO NOT IMPLEMENT
protected:
- ConstantPacked(const PackedType *T, const std::vector<Constant*> &Val);
- ~ConstantPacked();
+ ConstantVector(const VectorType *T, const std::vector<Constant*> &Val);
+ ~ConstantVector();
public:
/// get() - Static factory methods - Return objects of the specified value
- static Constant *get(const PackedType *T, const std::vector<Constant*> &);
+ static Constant *get(const VectorType *T, const std::vector<Constant*> &);
static Constant *get(const std::vector<Constant*> &V);
- /// getType - Specialize the getType() method to always return an PackedType,
+ /// getType - Specialize the getType() method to always return an VectorType,
/// which reduces the amount of casting needed in parts of the compiler.
///
- inline const PackedType *getType() const {
- return reinterpret_cast<const PackedType*>(Value::getType());
+ inline const VectorType *getType() const {
+ return reinterpret_cast<const VectorType*>(Value::getType());
}
/// @returns the value for an packed integer constant of the given type that
/// has all its bits set to true.
/// @brief Get the all ones value
- static ConstantPacked *getAllOnesValue(const PackedType *Ty);
+ static ConstantVector *getAllOnesValue(const VectorType *Ty);
/// isNullValue - Return true if this is the value that would be returned by
/// getNullValue. This always returns false because zero arrays are always
@@ -375,9 +375,9 @@ public:
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const ConstantPacked *) { return true; }
+ static inline bool classof(const ConstantVector *) { return true; }
static bool classof(const Value *V) {
- return V->getValueType() == ConstantPackedVal;
+ return V->getValueType() == ConstantVectorVal;
}
};
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h
index 06f3a98..2426e7b 100644
--- a/include/llvm/DerivedTypes.h
+++ b/include/llvm/DerivedTypes.h
@@ -28,7 +28,7 @@ class FunctionValType;
class ArrayValType;
class StructValType;
class PointerValType;
-class PackedValType;
+class VectorValType;
class IntegerValType;
class DerivedType : public Type {
@@ -214,7 +214,7 @@ public:
/// CompositeType - Common super class of ArrayType, StructType, PointerType
-/// and PackedType
+/// and VectorType
class CompositeType : public DerivedType {
protected:
inline CompositeType(TypeID id) : DerivedType(id) { }
@@ -232,7 +232,7 @@ public:
return T->getTypeID() == ArrayTyID ||
T->getTypeID() == StructTyID ||
T->getTypeID() == PointerTyID ||
- T->getTypeID() == PackedTyID;
+ T->getTypeID() == VectorTyID;
}
};
@@ -317,7 +317,7 @@ public:
static inline bool classof(const Type *T) {
return T->getTypeID() == ArrayTyID ||
T->getTypeID() == PointerTyID ||
- T->getTypeID() == PackedTyID;
+ T->getTypeID() == VectorTyID;
}
};
@@ -350,25 +350,25 @@ public:
}
};
-/// PackedType - Class to represent packed types
+/// VectorType - Class to represent packed types
///
-class PackedType : public SequentialType {
- friend class TypeMap<PackedValType, PackedType>;
+class VectorType : public SequentialType {
+ friend class TypeMap<VectorValType, VectorType>;
unsigned NumElements;
- PackedType(const PackedType &); // Do not implement
- const PackedType &operator=(const PackedType &); // Do not implement
- PackedType(const Type *ElType, unsigned NumEl);
+ VectorType(const VectorType &); // Do not implement
+ const VectorType &operator=(const VectorType &); // Do not implement
+ VectorType(const Type *ElType, unsigned NumEl);
public:
- /// PackedType::get - This static method is the primary way to construct an
- /// PackedType
+ /// VectorType::get - This static method is the primary way to construct an
+ /// VectorType
///
- static PackedType *get(const Type *ElementType, unsigned NumElements);
+ static VectorType *get(const Type *ElementType, unsigned NumElements);
- /// @brief Return the number of elements in the Packed type.
+ /// @brief Return the number of elements in the Vector type.
inline unsigned getNumElements() const { return NumElements; }
- /// @brief Return the number of bits in the Packed type.
+ /// @brief Return the number of bits in the Vector type.
inline unsigned getBitWidth() const {
return NumElements *getElementType()->getPrimitiveSizeInBits();
}
@@ -378,9 +378,9 @@ public:
virtual void typeBecameConcrete(const DerivedType *AbsTy);
// Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const PackedType *T) { return true; }
+ static inline bool classof(const VectorType *T) { return true; }
static inline bool classof(const Type *T) {
- return T->getTypeID() == PackedTyID;
+ return T->getTypeID() == VectorTyID;
}
};
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 3d22ef2..a5f0b0b 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -23,7 +23,7 @@ namespace llvm {
class BasicBlock;
class ConstantInt;
class PointerType;
-class PackedType;
+class VectorType;
//===----------------------------------------------------------------------===//
// AllocationInst Class
@@ -862,7 +862,7 @@ public:
//===----------------------------------------------------------------------===//
/// ExtractElementInst - This instruction extracts a single (scalar)
-/// element from a PackedType value
+/// element from a VectorType value
///
class ExtractElementInst : public Instruction {
Use Ops[2];
@@ -916,7 +916,7 @@ public:
//===----------------------------------------------------------------------===//
/// InsertElementInst - This instruction inserts a single (scalar)
-/// element into a PackedType value
+/// element into a VectorType value
///
class InsertElementInst : public Instruction {
Use Ops[3];
@@ -942,8 +942,8 @@ public:
/// getType - Overload to return most specific packed type.
///
- inline const PackedType *getType() const {
- return reinterpret_cast<const PackedType*>(Instruction::getType());
+ inline const VectorType *getType() const {
+ return reinterpret_cast<const VectorType*>(Instruction::getType());
}
/// Transparently provide more efficient getOperand methods.
@@ -994,8 +994,8 @@ public:
/// getType - Overload to return most specific packed type.
///
- inline const PackedType *getType() const {
- return reinterpret_cast<const PackedType*>(Instruction::getType());
+ inline const VectorType *getType() const {
+ return reinterpret_cast<const VectorType*>(Instruction::getType());
}
/// Transparently provide more efficient getOperand methods.
diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td
index f3cd4f6..05a5a68 100644
--- a/include/llvm/Intrinsics.td
+++ b/include/llvm/Intrinsics.td
@@ -62,8 +62,8 @@ class LLVMIntegerType<ValueType VT, int width>
int Width = width;
}
-class LLVMPackedType<ValueType VT, int numelts, LLVMType elty>
- : LLVMType<VT, "Type::PackedTyID">{
+class LLVMVectorType<ValueType VT, int numelts, LLVMType elty>
+ : LLVMType<VT, "Type::VectorTyID">{
int NumElts = numelts;
LLVMType ElTy = elty;
}
@@ -90,13 +90,13 @@ def llvm_ptrptr_ty : LLVMPointerType<llvm_ptr_ty>; // i8**
def llvm_empty_ty : LLVMEmptyStructType; // { }
def llvm_descriptor_ty : LLVMPointerType<llvm_empty_ty>; // { }*
-def llvm_v16i8_ty : LLVMPackedType<v16i8,16, llvm_i8_ty>; // 16 x i8
-def llvm_v8i16_ty : LLVMPackedType<v8i16, 8, llvm_i16_ty>; // 8 x i16
-def llvm_v2i64_ty : LLVMPackedType<v2i64, 2, llvm_i64_ty>; // 2 x i64
-def llvm_v2i32_ty : LLVMPackedType<v2i32, 2, llvm_i32_ty>; // 2 x i32
-def llvm_v4i32_ty : LLVMPackedType<v4i32, 4, llvm_i32_ty>; // 4 x i32
-def llvm_v4f32_ty : LLVMPackedType<v4f32, 4, llvm_float_ty>; // 4 x float
-def llvm_v2f64_ty : LLVMPackedType<v2f64, 2, llvm_double_ty>;// 2 x double
+def llvm_v16i8_ty : LLVMVectorType<v16i8,16, llvm_i8_ty>; // 16 x i8
+def llvm_v8i16_ty : LLVMVectorType<v8i16, 8, llvm_i16_ty>; // 8 x i16
+def llvm_v2i64_ty : LLVMVectorType<v2i64, 2, llvm_i64_ty>; // 2 x i64
+def llvm_v2i32_ty : LLVMVectorType<v2i32, 2, llvm_i32_ty>; // 2 x i32
+def llvm_v4i32_ty : LLVMVectorType<v4i32, 4, llvm_i32_ty>; // 4 x i32
+def llvm_v4f32_ty : LLVMVectorType<v4f32, 4, llvm_float_ty>; // 4 x float
+def llvm_v2f64_ty : LLVMVectorType<v2f64, 2, llvm_double_ty>;// 2 x double
def llvm_vararg_ty : LLVMType<isVoid, "...">; // vararg
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 7bdf01f..7a16529 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -38,7 +38,7 @@ namespace llvm {
class SelectionDAG;
class MachineBasicBlock;
class MachineInstr;
- class PackedType;
+ class VectorType;
//===----------------------------------------------------------------------===//
/// TargetLowering - This class defines information used to lower LLVM code to
@@ -198,16 +198,16 @@ public:
return VT;
}
- /// getPackedTypeBreakdown - Packed types are broken down into some number of
+ /// getVectorTypeBreakdown - Packed types are broken down into some number of
/// legal first class types. For example, <8 x float> maps to 2 MVT::v4f32
/// with Altivec or SSE1, or 8 promoted MVT::f64 values with the X86 FP stack.
/// Similarly, <2 x long> turns into 4 MVT::i32 values with both PPC and X86.
///
/// This method returns the number of registers needed, and the VT for each
- /// register. It also returns the VT of the PackedType elements before they
+ /// register. It also returns the VT of the VectorType elements before they
/// are promoted/expanded.
///
- unsigned getPackedTypeBreakdown(const PackedType *PTy,
+ unsigned getVectorTypeBreakdown(const VectorType *PTy,
MVT::ValueType &PTyElementVT,
MVT::ValueType &PTyLegalElementVT) const;
diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h
index ff6fbf0..8c6e6cc 100644
--- a/include/llvm/Transforms/Scalar.h
+++ b/include/llvm/Transforms/Scalar.h
@@ -261,7 +261,7 @@ extern const PassInfo *LowerSwitchID;
//===----------------------------------------------------------------------===//
//
-// LowerPacked - This pass converts PackedType operations into low-level scalar
+// LowerPacked - This pass converts VectorType operations into low-level scalar
// operations.
//
FunctionPass *createLowerPackedPass();
diff --git a/include/llvm/Type.h b/include/llvm/Type.h
index 7a2e432..880daad 100644
--- a/include/llvm/Type.h
+++ b/include/llvm/Type.h
@@ -81,7 +81,7 @@ public:
ArrayTyID, ///< 8: Arrays
PointerTyID, ///< 9: Pointers
OpaqueTyID, ///< 10: Opaque: type with unknown structure
- PackedTyID, ///< 11: SIMD 'packed' format, or other vector type
+ VectorTyID, ///< 11: SIMD 'packed' format, or other vector type
NumTypeIDs, // Must remain as last defined ID
LastPrimitiveTyID = LabelTyID,
@@ -191,7 +191,7 @@ public:
///
inline bool isFirstClassType() const {
return (ID != VoidTyID && ID <= LastPrimitiveTyID) ||
- ID == IntegerTyID || ID == PointerTyID || ID == PackedTyID;
+ ID == IntegerTyID || ID == PointerTyID || ID == VectorTyID;
}
/// isSized - Return true if it makes sense to take the size of this type. To
@@ -204,7 +204,7 @@ public:
return true;
// If it is not something that can have a size (e.g. a function or label),
// it doesn't have a size.
- if (ID != StructTyID && ID != ArrayTyID && ID != PackedTyID &&
+ if (ID != StructTyID && ID != ArrayTyID && ID != VectorTyID &&
ID != PackedStructTyID)
return false;
// If it is something that can have a size and it's concrete, it definitely
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index fac596b..1e2a8f6 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -167,7 +167,7 @@ public:
ConstantFPVal, // This is an instance of ConstantFP
ConstantArrayVal, // This is an instance of ConstantArray
ConstantStructVal, // This is an instance of ConstantStruct
- ConstantPackedVal, // This is an instance of ConstantPacked
+ ConstantVectorVal, // This is an instance of ConstantPacked
ConstantPointerNullVal, // This is an instance of ConstantPointerNull
InlineAsmVal, // This is an instance of InlineAsm
InstructionVal, // This is an instance of Instruction
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index 939fa6d..5785d09 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/lib/Analysis/BasicAliasAnalysis.cpp
@@ -689,7 +689,7 @@ BasicAliasAnalysis::CheckGEPInstructions(
if (const ArrayType *AT = dyn_cast<ArrayType>(BasePtr1Ty)) {
if (Op1C->getZExtValue() >= AT->getNumElements())
return MayAlias; // Be conservative with out-of-range accesses
- } else if (const PackedType *PT = dyn_cast<PackedType>(BasePtr1Ty)) {
+ } else if (const VectorType *PT = dyn_cast<VectorType>(BasePtr1Ty)) {
if (Op1C->getZExtValue() >= PT->getNumElements())
return MayAlias; // Be conservative with out-of-range accesses
}
@@ -707,7 +707,7 @@ BasicAliasAnalysis::CheckGEPInstructions(
//
if (const ArrayType *AT = dyn_cast<ArrayType>(BasePtr1Ty))
GEP1Ops[i] = ConstantInt::get(Type::Int64Ty,AT->getNumElements()-1);
- else if (const PackedType *PT = dyn_cast<PackedType>(BasePtr1Ty))
+ else if (const VectorType *PT = dyn_cast<VectorType>(BasePtr1Ty))
GEP1Ops[i] = ConstantInt::get(Type::Int64Ty,PT->getNumElements()-1);
}
@@ -719,7 +719,7 @@ BasicAliasAnalysis::CheckGEPInstructions(
if (const ArrayType *AT = dyn_cast<ArrayType>(BasePtr1Ty)) {
if (Op2C->getZExtValue() >= AT->getNumElements())
return MayAlias; // Be conservative with out-of-range accesses
- } else if (const PackedType *PT = dyn_cast<PackedType>(BasePtr1Ty)) {
+ } else if (const VectorType *PT = dyn_cast<VectorType>(BasePtr1Ty)) {
if (Op2C->getZExtValue() >= PT->getNumElements())
return MayAlias; // Be conservative with out-of-range accesses
}
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index 6fd8ff8..01aedda 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -283,10 +283,10 @@ Constant *llvm::ConstantFoldLoadThroughGEPConstantExpr(Constant *C,
C = UndefValue::get(ATy->getElementType());
else
return 0;
- } else if (const PackedType *PTy = dyn_cast<PackedType>(*I)) {
+ } else if (const VectorType *PTy = dyn_cast<VectorType>(*I)) {
if (CI->getZExtValue() >= PTy->getNumElements())
return 0;
- if (ConstantPacked *CP = dyn_cast<ConstantPacked>(C))
+ if (ConstantVector *CP = dyn_cast<ConstantVector>(C))
C = CP->getOperand(CI->getZExtValue());
else if (isa<ConstantAggregateZero>(C))
C = Constant::getNullValue(PTy->getElementType());
diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs
index 6267f3c..6c0011d 100644
--- a/lib/AsmParser/llvmAsmParser.cpp.cvs
+++ b/lib/AsmParser/llvmAsmParser.cpp.cvs
@@ -1,147 +1,336 @@
+/* A Bison parser, made by GNU Bison 2.1. */
-/* A Bison parser, made from /Users/sabre/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 LOCALVAL_ID 259
-#define GLOBALVAL_ID 260
-#define FPVAL 261
-#define VOID 262
-#define INTTYPE 263
-#define FLOAT 264
-#define DOUBLE 265
-#define LABEL 266
-#define TYPE 267
-#define LOCALVAR 268
-#define GLOBALVAR 269
-#define LABELSTR 270
-#define STRINGCONSTANT 271
-#define ATSTRINGCONSTANT 272
-#define IMPLEMENTATION 273
-#define ZEROINITIALIZER 274
-#define TRUETOK 275
-#define FALSETOK 276
-#define BEGINTOK 277
-#define ENDTOK 278
-#define DECLARE 279
-#define DEFINE 280
-#define GLOBAL 281
-#define CONSTANT 282
-#define SECTION 283
-#define VOLATILE 284
-#define TO 285
-#define DOTDOTDOT 286
-#define NULL_TOK 287
-#define UNDEF 288
-#define INTERNAL 289
-#define LINKONCE 290
-#define WEAK 291
-#define APPENDING 292
-#define DLLIMPORT 293
-#define DLLEXPORT 294
-#define EXTERN_WEAK 295
-#define OPAQUE 296
-#define EXTERNAL 297
-#define TARGET 298
-#define TRIPLE 299
-#define ALIGN 300
-#define DEPLIBS 301
-#define CALL 302
-#define TAIL 303
-#define ASM_TOK 304
-#define MODULE 305
-#define SIDEEFFECT 306
-#define CC_TOK 307
-#define CCC_TOK 308
-#define FASTCC_TOK 309
-#define COLDCC_TOK 310
-#define X86_STDCALLCC_TOK 311
-#define X86_FASTCALLCC_TOK 312
-#define DATALAYOUT 313
-#define RET 314
-#define BR 315
-#define SWITCH 316
-#define INVOKE 317
-#define UNWIND 318
-#define UNREACHABLE 319
-#define ADD 320
-#define SUB 321
-#define MUL 322
-#define UDIV 323
-#define SDIV 324
-#define FDIV 325
-#define UREM 326
-#define SREM 327
-#define FREM 328
-#define AND 329
-#define OR 330
-#define XOR 331
-#define SHL 332
-#define LSHR 333
-#define ASHR 334
-#define ICMP 335
-#define FCMP 336
-#define EQ 337
-#define NE 338
-#define SLT 339
-#define SGT 340
-#define SLE 341
-#define SGE 342
-#define ULT 343
-#define UGT 344
-#define ULE 345
-#define UGE 346
-#define OEQ 347
-#define ONE 348
-#define OLT 349
-#define OGT 350
-#define OLE 351
-#define OGE 352
-#define ORD 353
-#define UNO 354
-#define UEQ 355
-#define UNE 356
-#define MALLOC 357
-#define ALLOCA 358
-#define FREE 359
-#define LOAD 360
-#define STORE 361
-#define GETELEMENTPTR 362
-#define TRUNC 363
-#define ZEXT 364
-#define SEXT 365
-#define FPTRUNC 366
-#define FPEXT 367
-#define BITCAST 368
-#define UITOFP 369
-#define SITOFP 370
-#define FPTOUI 371
-#define FPTOSI 372
-#define INTTOPTR 373
-#define PTRTOINT 374
-#define PHI_TOK 375
-#define SELECT 376
-#define VAARG 377
-#define EXTRACTELEMENT 378
-#define INSERTELEMENT 379
-#define SHUFFLEVECTOR 380
-#define NORETURN 381
-#define INREG 382
-#define SRET 383
-#define DEFAULT 384
-#define HIDDEN 385
-
-#line 14 "/Users/sabre/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,
+ LOCALVAL_ID = 260,
+ GLOBALVAL_ID = 261,
+ FPVAL = 262,
+ VOID = 263,
+ INTTYPE = 264,
+ FLOAT = 265,
+ DOUBLE = 266,
+ LABEL = 267,
+ TYPE = 268,
+ LOCALVAR = 269,
+ GLOBALVAR = 270,
+ LABELSTR = 271,
+ STRINGCONSTANT = 272,
+ ATSTRINGCONSTANT = 273,
+ IMPLEMENTATION = 274,
+ ZEROINITIALIZER = 275,
+ TRUETOK = 276,
+ FALSETOK = 277,
+ BEGINTOK = 278,
+ ENDTOK = 279,
+ DECLARE = 280,
+ DEFINE = 281,
+ GLOBAL = 282,
+ CONSTANT = 283,
+ SECTION = 284,
+ VOLATILE = 285,
+ TO = 286,
+ DOTDOTDOT = 287,
+ NULL_TOK = 288,
+ UNDEF = 289,
+ INTERNAL = 290,
+ LINKONCE = 291,
+ WEAK = 292,
+ APPENDING = 293,
+ DLLIMPORT = 294,
+ DLLEXPORT = 295,
+ EXTERN_WEAK = 296,
+ OPAQUE = 297,
+ EXTERNAL = 298,
+ TARGET = 299,
+ TRIPLE = 300,
+ ALIGN = 301,
+ DEPLIBS = 302,
+ CALL = 303,
+ TAIL = 304,
+ ASM_TOK = 305,
+ MODULE = 306,
+ SIDEEFFECT = 307,
+ CC_TOK = 308,
+ CCC_TOK = 309,
+ FASTCC_TOK = 310,
+ COLDCC_TOK = 311,
+ X86_STDCALLCC_TOK = 312,
+ X86_FASTCALLCC_TOK = 313,
+ DATALAYOUT = 314,
+ RET = 315,
+ BR = 316,
+ SWITCH = 317,
+ INVOKE = 318,
+ UNWIND = 319,
+ UNREACHABLE = 320,
+ ADD = 321,
+ SUB = 322,
+ MUL = 323,
+ UDIV = 324,
+ SDIV = 325,
+ FDIV = 326,
+ UREM = 327,
+ SREM = 328,
+ FREM = 329,
+ AND = 330,
+ OR = 331,
+ XOR = 332,
+ SHL = 333,
+ LSHR = 334,
+ ASHR = 335,
+ ICMP = 336,
+ FCMP = 337,
+ EQ = 338,
+ NE = 339,
+ SLT = 340,
+ SGT = 341,
+ SLE = 342,
+ SGE = 343,
+ ULT = 344,
+ UGT = 345,
+ ULE = 346,
+ UGE = 347,
+ OEQ = 348,
+ ONE = 349,
+ OLT = 350,
+ OGT = 351,
+ OLE = 352,
+ OGE = 353,
+ ORD = 354,
+ UNO = 355,
+ UEQ = 356,
+ UNE = 357,
+ MALLOC = 358,
+ ALLOCA = 359,
+ FREE = 360,
+ LOAD = 361,
+ STORE = 362,
+ GETELEMENTPTR = 363,
+ TRUNC = 364,
+ ZEXT = 365,
+ SEXT = 366,
+ FPTRUNC = 367,
+ FPEXT = 368,
+ BITCAST = 369,
+ UITOFP = 370,
+ SITOFP = 371,
+ FPTOUI = 372,
+ FPTOSI = 373,
+ INTTOPTR = 374,
+ PTRTOINT = 375,
+ PHI_TOK = 376,
+ SELECT = 377,
+ VAARG = 378,
+ EXTRACTELEMENT = 379,
+ INSERTELEMENT = 380,
+ SHUFFLEVECTOR = 381,
+ NORETURN = 382,
+ INREG = 383,
+ SRET = 384,
+ DEFAULT = 385,
+ HIDDEN = 386
+ };
+#endif
+/* Tokens. */
+#define ESINT64VAL 258
+#define EUINT64VAL 259
+#define LOCALVAL_ID 260
+#define GLOBALVAL_ID 261
+#define FPVAL 262
+#define VOID 263
+#define INTTYPE 264
+#define FLOAT 265
+#define DOUBLE 266
+#define LABEL 267
+#define TYPE 268
+#define LOCALVAR 269
+#define GLOBALVAR 270
+#define LABELSTR 271
+#define STRINGCONSTANT 272
+#define ATSTRINGCONSTANT 273
+#define IMPLEMENTATION 274
+#define ZEROINITIALIZER 275
+#define TRUETOK 276
+#define FALSETOK 277
+#define BEGINTOK 278
+#define ENDTOK 279
+#define DECLARE 280
+#define DEFINE 281
+#define GLOBAL 282
+#define CONSTANT 283
+#define SECTION 284
+#define VOLATILE 285
+#define TO 286
+#define DOTDOTDOT 287
+#define NULL_TOK 288
+#define UNDEF 289
+#define INTERNAL 290
+#define LINKONCE 291
+#define WEAK 292
+#define APPENDING 293
+#define DLLIMPORT 294
+#define DLLEXPORT 295
+#define EXTERN_WEAK 296
+#define OPAQUE 297
+#define EXTERNAL 298
+#define TARGET 299
+#define TRIPLE 300
+#define ALIGN 301
+#define DEPLIBS 302
+#define CALL 303
+#define TAIL 304
+#define ASM_TOK 305
+#define MODULE 306
+#define SIDEEFFECT 307
+#define CC_TOK 308
+#define CCC_TOK 309
+#define FASTCC_TOK 310
+#define COLDCC_TOK 311
+#define X86_STDCALLCC_TOK 312
+#define X86_FASTCALLCC_TOK 313
+#define DATALAYOUT 314
+#define RET 315
+#define BR 316
+#define SWITCH 317
+#define INVOKE 318
+#define UNWIND 319
+#define UNREACHABLE 320
+#define ADD 321
+#define SUB 322
+#define MUL 323
+#define UDIV 324
+#define SDIV 325
+#define FDIV 326
+#define UREM 327
+#define SREM 328
+#define FREM 329
+#define AND 330
+#define OR 331
+#define XOR 332
+#define SHL 333
+#define LSHR 334
+#define ASHR 335
+#define ICMP 336
+#define FCMP 337
+#define EQ 338
+#define NE 339
+#define SLT 340
+#define SGT 341
+#define SLE 342
+#define SGE 343
+#define ULT 344
+#define UGT 345
+#define ULE 346
+#define UGE 347
+#define OEQ 348
+#define ONE 349
+#define OLT 350
+#define OGT 351
+#define OLE 352
+#define OGE 353
+#define ORD 354
+#define UNO 355
+#define UEQ 356
+#define UNE 357
+#define MALLOC 358
+#define ALLOCA 359
+#define FREE 360
+#define LOAD 361
+#define STORE 362
+#define GETELEMENTPTR 363
+#define TRUNC 364
+#define ZEXT 365
+#define SEXT 366
+#define FPTRUNC 367
+#define FPEXT 368
+#define BITCAST 369
+#define UITOFP 370
+#define SITOFP 371
+#define FPTOUI 372
+#define FPTOSI 373
+#define INTTOPTR 374
+#define PTRTOINT 375
+#define PHI_TOK 376
+#define SELECT 377
+#define VAARG 378
+#define EXTRACTELEMENT 379
+#define INSERTELEMENT 380
+#define SHUFFLEVECTOR 381
+#define NORETURN 382
+#define INREG 383
+#define SRET 384
+#define DEFAULT 385
+#define HIDDEN 386
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 14 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
#include "ParserInternals.h"
#include "llvm/CallingConv.h"
@@ -1028,8 +1217,28 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
}
-#line 901 "/Users/sabre/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 901 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
llvm::BasicBlock *BasicBlockVal;
@@ -1074,1061 +1283,1519 @@ typedef union {
llvm::ICmpInst::Predicate IPredicate;
llvm::FCmpInst::Predicate FPredicate;
} YYSTYPE;
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
+/* Line 196 of yacc.c. */
+#line 1288 "llvmAsmParser.tab.c"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-#define YYFINAL 557
-#define YYFLAG -32768
-#define YYNTBASE 146
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 385 ? yytranslate[x] : 223)
-
-static const short 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, 136,
- 137, 134, 2, 133, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 141,
- 132, 142, 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,
- 138, 135, 140, 2, 2, 2, 2, 2, 145, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 139,
- 2, 2, 143, 2, 144, 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, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131
-};
+/* 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, 66, 68, 70, 72, 74, 76, 78,
- 80, 82, 84, 86, 88, 90, 92, 94, 96, 98,
- 100, 102, 104, 106, 108, 110, 112, 114, 116, 118,
- 119, 122, 123, 125, 127, 130, 131, 133, 135, 137,
- 139, 141, 143, 145, 147, 148, 150, 151, 153, 155,
- 156, 158, 160, 162, 164, 165, 167, 169, 171, 173,
- 175, 178, 180, 182, 184, 186, 187, 190, 192, 194,
- 195, 198, 199, 202, 203, 207, 210, 211, 213, 214,
- 218, 220, 223, 225, 227, 229, 231, 233, 235, 238,
- 240, 243, 249, 255, 261, 267, 271, 274, 280, 285,
- 288, 290, 292, 294, 298, 300, 304, 306, 307, 309,
- 313, 318, 322, 326, 331, 336, 340, 347, 353, 356,
- 359, 362, 365, 368, 371, 374, 377, 380, 383, 390,
- 396, 405, 412, 419, 427, 435, 442, 451, 460, 464,
- 466, 468, 470, 472, 473, 475, 478, 479, 483, 484,
- 488, 492, 494, 498, 502, 503, 510, 511, 519, 520,
- 528, 531, 535, 537, 541, 545, 549, 553, 555, 556,
- 562, 566, 568, 572, 574, 575, 585, 587, 589, 594,
- 596, 598, 601, 605, 606, 608, 610, 612, 614, 616,
- 618, 620, 622, 624, 628, 630, 636, 638, 640, 642,
- 644, 646, 648, 651, 654, 657, 661, 664, 665, 667,
- 670, 673, 677, 687, 697, 706, 721, 723, 725, 732,
- 738, 741, 748, 756, 760, 766, 767, 768, 772, 775,
- 777, 783, 789, 796, 803, 808, 815, 820, 825, 832,
- 839, 842, 851, 853, 855, 856, 860, 867, 871, 878,
- 881, 886, 893
-};
-static const short yyrhs[] = { 66,
- 0, 67, 0, 68, 0, 69, 0, 70, 0, 71,
- 0, 72, 0, 73, 0, 74, 0, 78, 0, 79,
- 0, 80, 0, 75, 0, 76, 0, 77, 0, 109,
- 0, 110, 0, 111, 0, 112, 0, 113, 0, 114,
- 0, 115, 0, 116, 0, 117, 0, 118, 0, 119,
- 0, 120, 0, 83, 0, 84, 0, 85, 0, 86,
- 0, 87, 0, 88, 0, 89, 0, 90, 0, 91,
- 0, 92, 0, 93, 0, 94, 0, 95, 0, 96,
- 0, 97, 0, 98, 0, 99, 0, 100, 0, 101,
- 0, 102, 0, 89, 0, 90, 0, 91, 0, 92,
- 0, 21, 0, 22, 0, 9, 0, 10, 0, 11,
- 0, 14, 0, 17, 0, 153, 0, 0, 153, 132,
- 0, 0, 15, 0, 18, 0, 156, 132, 0, 0,
- 35, 0, 37, 0, 36, 0, 38, 0, 40, 0,
- 39, 0, 41, 0, 43, 0, 0, 131, 0, 0,
- 39, 0, 41, 0, 0, 35, 0, 36, 0, 37,
- 0, 40, 0, 0, 54, 0, 55, 0, 56, 0,
- 57, 0, 58, 0, 53, 4, 0, 110, 0, 111,
- 0, 128, 0, 129, 0, 0, 165, 164, 0, 127,
- 0, 164, 0, 0, 167, 166, 0, 0, 46, 4,
- 0, 0, 133, 46, 4, 0, 29, 17, 0, 0,
- 170, 0, 0, 133, 173, 172, 0, 170, 0, 46,
- 4, 0, 9, 0, 10, 0, 11, 0, 12, 0,
- 42, 0, 174, 0, 175, 134, 0, 207, 0, 135,
- 4, 0, 175, 136, 179, 137, 167, 0, 8, 136,
- 179, 137, 167, 0, 138, 4, 139, 175, 140, 0,
- 141, 4, 139, 175, 142, 0, 143, 180, 144, 0,
- 143, 144, 0, 141, 143, 180, 144, 142, 0, 141,
- 143, 144, 142, 0, 175, 165, 0, 175, 0, 8,
- 0, 176, 0, 178, 133, 176, 0, 178, 0, 178,
- 133, 32, 0, 32, 0, 0, 175, 0, 180, 133,
- 175, 0, 175, 138, 183, 140, 0, 175, 138, 140,
- 0, 175, 145, 17, 0, 175, 141, 183, 142, 0,
- 175, 143, 183, 144, 0, 175, 143, 144, 0, 175,
- 141, 143, 183, 144, 142, 0, 175, 141, 143, 144,
- 142, 0, 175, 33, 0, 175, 34, 0, 175, 207,
- 0, 175, 182, 0, 175, 20, 0, 151, 3, 0,
- 151, 4, 0, 9, 21, 0, 9, 22, 0, 152,
- 7, 0, 148, 136, 181, 31, 175, 137, 0, 108,
- 136, 181, 218, 137, 0, 122, 136, 181, 133, 181,
- 133, 181, 137, 0, 146, 136, 181, 133, 181, 137,
- 0, 147, 136, 181, 133, 181, 137, 0, 81, 149,
- 136, 181, 133, 181, 137, 0, 82, 150, 136, 181,
- 133, 181, 137, 0, 124, 136, 181, 133, 181, 137,
- 0, 125, 136, 181, 133, 181, 133, 181, 137, 0,
- 126, 136, 181, 133, 181, 133, 181, 137, 0, 183,
- 133, 181, 0, 181, 0, 27, 0, 28, 0, 186,
- 0, 0, 187, 0, 186, 187, 0, 0, 26, 188,
- 203, 0, 0, 25, 189, 204, 0, 51, 50, 193,
- 0, 19, 0, 155, 13, 175, 0, 155, 13, 8,
- 0, 0, 157, 160, 184, 181, 190, 172, 0, 0,
- 157, 158, 160, 184, 181, 191, 172, 0, 0, 157,
- 159, 160, 184, 175, 192, 172, 0, 44, 194, 0,
- 47, 132, 195, 0, 17, 0, 45, 132, 17, 0,
- 59, 132, 17, 0, 138, 196, 140, 0, 196, 133,
- 17, 0, 17, 0, 0, 197, 133, 175, 165, 154,
- 0, 175, 165, 154, 0, 197, 0, 197, 133, 32,
- 0, 32, 0, 0, 163, 177, 156, 136, 198, 137,
- 167, 171, 168, 0, 23, 0, 143, 0, 162, 160,
- 199, 200, 0, 24, 0, 144, 0, 210, 202, 0,
- 161, 160, 199, 0, 0, 52, 0, 3, 0, 4,
- 0, 7, 0, 21, 0, 22, 0, 33, 0, 34,
- 0, 20, 0, 141, 183, 142, 0, 182, 0, 50,
- 205, 17, 133, 17, 0, 5, 0, 6, 0, 153,
- 0, 156, 0, 207, 0, 206, 0, 175, 208, 0,
- 210, 211, 0, 201, 211, 0, 212, 155, 213, 0,
- 212, 215, 0, 0, 16, 0, 60, 209, 0, 60,
- 8, 0, 61, 12, 208, 0, 61, 9, 208, 133,
- 12, 208, 133, 12, 208, 0, 62, 151, 208, 133,
- 12, 208, 138, 214, 140, 0, 62, 151, 208, 133,
- 12, 208, 138, 140, 0, 63, 163, 177, 208, 136,
- 217, 137, 167, 31, 12, 208, 64, 12, 208, 0,
- 64, 0, 65, 0, 214, 151, 206, 133, 12, 208,
- 0, 151, 206, 133, 12, 208, 0, 155, 220, 0,
- 175, 138, 208, 133, 208, 140, 0, 216, 133, 138,
- 208, 133, 208, 140, 0, 175, 208, 165, 0, 217,
- 133, 175, 208, 165, 0, 0, 0, 218, 133, 209,
- 0, 49, 48, 0, 48, 0, 146, 175, 208, 133,
- 208, 0, 147, 175, 208, 133, 208, 0, 81, 149,
- 175, 208, 133, 208, 0, 82, 150, 175, 208, 133,
- 208, 0, 148, 209, 31, 175, 0, 122, 209, 133,
- 209, 133, 209, 0, 123, 209, 133, 175, 0, 124,
- 209, 133, 209, 0, 125, 209, 133, 209, 133, 209,
- 0, 126, 209, 133, 209, 133, 209, 0, 121, 216,
- 0, 219, 163, 177, 208, 136, 217, 137, 167, 0,
- 222, 0, 30, 0, 0, 103, 175, 169, 0, 103,
- 175, 133, 9, 208, 169, 0, 104, 175, 169, 0,
- 104, 175, 133, 9, 208, 169, 0, 105, 209, 0,
- 221, 106, 175, 208, 0, 221, 107, 209, 133, 175,
- 208, 0, 108, 175, 208, 218, 0
-};
+/* Line 219 of yacc.c. */
+#line 1300 "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,
- 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1049,
- 1049, 1049, 1049, 1049, 1049, 1050, 1050, 1050, 1050, 1050,
- 1050, 1050, 1051, 1051, 1051, 1051, 1051, 1054, 1054, 1055,
- 1055, 1056, 1056, 1057, 1057, 1058, 1058, 1062, 1062, 1063,
- 1063, 1064, 1064, 1065, 1065, 1066, 1066, 1067, 1067, 1068,
- 1068, 1069, 1070, 1075, 1076, 1076, 1078, 1078, 1079, 1079,
- 1083, 1087, 1092, 1092, 1094, 1098, 1104, 1105, 1106, 1107,
- 1108, 1112, 1113, 1114, 1118, 1119, 1123, 1124, 1125, 1129,
- 1130, 1131, 1132, 1133, 1136, 1136, 1137, 1138, 1139, 1140,
- 1141, 1149, 1150, 1151, 1152, 1155, 1156, 1161, 1162, 1165,
- 1166, 1173, 1173, 1180, 1180, 1189, 1197, 1197, 1203, 1203,
- 1205, 1210, 1223, 1223, 1223, 1223, 1226, 1230, 1234, 1241,
- 1246, 1254, 1272, 1290, 1295, 1307, 1317, 1321, 1331, 1338,
- 1345, 1352, 1357, 1362, 1369, 1370, 1377, 1384, 1392, 1397,
- 1408, 1436, 1452, 1481, 1509, 1534, 1553, 1578, 1597, 1609,
- 1616, 1682, 1692, 1702, 1708, 1714, 1719, 1724, 1732, 1744,
- 1766, 1774, 1780, 1791, 1796, 1801, 1807, 1813, 1822, 1826,
- 1834, 1834, 1845, 1850, 1858, 1859, 1863, 1863, 1867, 1867,
- 1870, 1873, 1885, 1909, 1920, 1927, 1930, 1935, 1938, 1944,
- 1948, 1951, 1957, 1970, 1974, 1979, 1981, 1986, 1991, 2000,
- 2010, 2021, 2025, 2034, 2043, 2048, 2160, 2160, 2162, 2171,
- 2171, 2173, 2178, 2190, 2194, 2199, 2203, 2207, 2211, 2215,
- 2219, 2223, 2227, 2231, 2256, 2260, 2274, 2278, 2282, 2286,
- 2292, 2292, 2298, 2307, 2311, 2320, 2330, 2339, 2351, 2364,
- 2368, 2372, 2377, 2387, 2406, 2415, 2482, 2486, 2493, 2504,
- 2517, 2527, 2538, 2548, 2556, 2564, 2567, 2568, 2575, 2579,
- 2584, 2605, 2622, 2635, 2648, 2660, 2668, 2675, 2681, 2687,
- 2693, 2708, 2772, 2777, 2781, 2788, 2795, 2803, 2810, 2818,
- 2826, 2840, 2857
-};
+#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 \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","ESINT64VAL",
-"EUINT64VAL","LOCALVAL_ID","GLOBALVAL_ID","FPVAL","VOID","INTTYPE","FLOAT","DOUBLE",
-"LABEL","TYPE","LOCALVAR","GLOBALVAR","LABELSTR","STRINGCONSTANT","ATSTRINGCONSTANT",
-"IMPLEMENTATION","ZEROINITIALIZER","TRUETOK","FALSETOK","BEGINTOK","ENDTOK",
-"DECLARE","DEFINE","GLOBAL","CONSTANT","SECTION","VOLATILE","TO","DOTDOTDOT",
-"NULL_TOK","UNDEF","INTERNAL","LINKONCE","WEAK","APPENDING","DLLIMPORT","DLLEXPORT",
-"EXTERN_WEAK","OPAQUE","EXTERNAL","TARGET","TRIPLE","ALIGN","DEPLIBS","CALL",
-"TAIL","ASM_TOK","MODULE","SIDEEFFECT","CC_TOK","CCC_TOK","FASTCC_TOK","COLDCC_TOK",
-"X86_STDCALLCC_TOK","X86_FASTCALLCC_TOK","DATALAYOUT","RET","BR","SWITCH","INVOKE",
-"UNWIND","UNREACHABLE","ADD","SUB","MUL","UDIV","SDIV","FDIV","UREM","SREM",
-"FREM","AND","OR","XOR","SHL","LSHR","ASHR","ICMP","FCMP","EQ","NE","SLT","SGT",
-"SLE","SGE","ULT","UGT","ULE","UGE","OEQ","ONE","OLT","OGT","OLE","OGE","ORD",
-"UNO","UEQ","UNE","MALLOC","ALLOCA","FREE","LOAD","STORE","GETELEMENTPTR","TRUNC",
-"ZEXT","SEXT","FPTRUNC","FPEXT","BITCAST","UITOFP","SITOFP","FPTOUI","FPTOSI",
-"INTTOPTR","PTRTOINT","PHI_TOK","SELECT","VAARG","EXTRACTELEMENT","INSERTELEMENT",
-"SHUFFLEVECTOR","NORETURN","INREG","SRET","DEFAULT","HIDDEN","'='","','","'*'",
-"'\\\\'","'('","')'","'['","'x'","']'","'<'","'>'","'{'","'}'","'c'","ArithmeticOps",
-"LogicalOps","CastOps","IPredicates","FPredicates","IntType","FPType","LocalName",
-"OptLocalName","OptLocalAssign","GlobalName","OptGlobalAssign","GVInternalLinkage",
-"GVExternalLinkage","GVVisibilityStyle","FunctionDeclareLinkage","FunctionDefineLinkage",
-"OptCallingConv","ParamAttr","OptParamAttrs","FuncAttr","OptFuncAttrs","OptAlign",
-"OptCAlign","SectionString","OptSection","GlobalVarAttributes","GlobalVarAttribute",
-"PrimType","Types","ArgType","ResultTypes","ArgTypeList","ArgTypeListI","TypeListI",
-"ConstVal","ConstExpr","ConstVector","GlobalType","Module","DefinitionList",
-"Definition","@1","@2","@3","@4","@5","AsmBlock","TargetDefinition","LibrariesDefinition",
-"LibList","ArgListH","ArgList","FunctionHeaderH","BEGIN","FunctionHeader","END",
-"Function","FunctionProto","OptSideEffect","ConstValueRef","SymbolicValueRef",
-"ValueRef","ResolvedVal","BasicBlockList","BasicBlock","InstructionList","BBTerminatorInst",
-"JumpTable","Inst","PHIList","ValueRefList","IndexList","OptTailCall","InstVal",
-"OptVolatile","MemoryInst", NULL
-};
#endif
-static const short yyr1[] = { 0,
- 146, 146, 146, 146, 146, 146, 146, 146, 146, 147,
- 147, 147, 147, 147, 147, 148, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 149, 149, 149,
- 149, 149, 149, 149, 149, 149, 149, 150, 150, 150,
- 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
- 150, 150, 150, 151, 152, 152, 153, 153, 154, 154,
- 155, 155, 156, 156, 157, 157, 158, 158, 158, 158,
- 158, 159, 159, 159, 160, 160, 161, 161, 161, 162,
- 162, 162, 162, 162, 163, 163, 163, 163, 163, 163,
- 163, 164, 164, 164, 164, 165, 165, 166, 166, 167,
- 167, 168, 168, 169, 169, 170, 171, 171, 172, 172,
- 173, 173, 174, 174, 174, 174, 175, 175, 175, 175,
- 175, 175, 175, 175, 175, 175, 175, 175, 175, 176,
- 177, 177, 178, 178, 179, 179, 179, 179, 180, 180,
- 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
- 181, 181, 181, 181, 181, 181, 181, 181, 182, 182,
- 182, 182, 182, 182, 182, 182, 182, 182, 183, 183,
- 184, 184, 185, 185, 186, 186, 188, 187, 189, 187,
- 187, 187, 187, 187, 190, 187, 191, 187, 192, 187,
- 187, 187, 193, 194, 194, 195, 196, 196, 196, 197,
- 197, 198, 198, 198, 198, 199, 200, 200, 201, 202,
- 202, 203, 204, 205, 205, 206, 206, 206, 206, 206,
- 206, 206, 206, 206, 206, 206, 207, 207, 207, 207,
- 208, 208, 209, 210, 210, 211, 212, 212, 212, 213,
- 213, 213, 213, 213, 213, 213, 213, 213, 214, 214,
- 215, 216, 216, 217, 217, 217, 218, 218, 219, 219,
- 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
- 220, 220, 220, 221, 221, 222, 222, 222, 222, 222,
- 222, 222, 222
-};
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short int yysigned_char;
+#endif
-static const short yyr2[] = { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
- 2, 0, 1, 1, 2, 0, 1, 1, 1, 1,
- 1, 1, 1, 1, 0, 1, 0, 1, 1, 0,
- 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
- 2, 1, 1, 1, 1, 0, 2, 1, 1, 0,
- 2, 0, 2, 0, 3, 2, 0, 1, 0, 3,
- 1, 2, 1, 1, 1, 1, 1, 1, 2, 1,
- 2, 5, 5, 5, 5, 3, 2, 5, 4, 2,
- 1, 1, 1, 3, 1, 3, 1, 0, 1, 3,
- 4, 3, 3, 4, 4, 3, 6, 5, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 6, 5,
- 8, 6, 6, 7, 7, 6, 8, 8, 3, 1,
- 1, 1, 1, 0, 1, 2, 0, 3, 0, 3,
- 3, 1, 3, 3, 0, 6, 0, 7, 0, 7,
- 2, 3, 1, 3, 3, 3, 3, 1, 0, 5,
- 3, 1, 3, 1, 0, 9, 1, 1, 4, 1,
- 1, 2, 3, 0, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 1, 5, 1, 1, 1, 1,
- 1, 1, 2, 2, 2, 3, 2, 0, 1, 2,
- 2, 3, 9, 9, 8, 14, 1, 1, 6, 5,
- 2, 6, 7, 3, 5, 0, 0, 3, 2, 1,
- 5, 5, 6, 6, 4, 6, 4, 4, 6, 6,
- 2, 8, 1, 1, 0, 3, 6, 3, 6, 2,
- 4, 6, 4
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 40
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 1439
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 146
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 78
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 284
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 557
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 386
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned 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,
+ 136, 137, 134, 2, 133, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 141, 132, 142, 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, 138, 135, 140, 2, 2, 2, 2, 2, 145,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 139, 2, 2, 143, 2, 144, 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, 2, 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, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131
};
-static const short yydefact[] = { 66,
- 57, 63, 58, 64, 182, 179, 177, 0, 0, 0,
- 0, 0, 0, 75, 66, 175, 77, 80, 0, 0,
- 191, 0, 0, 61, 0, 65, 67, 69, 68, 70,
- 72, 71, 73, 74, 76, 75, 75, 0, 176, 78,
- 79, 75, 180, 81, 82, 83, 84, 75, 238, 178,
- 238, 0, 0, 199, 192, 193, 181, 227, 228, 184,
- 113, 114, 115, 116, 117, 0, 0, 0, 0, 229,
- 230, 118, 183, 120, 0, 0, 171, 172, 0, 85,
- 85, 239, 235, 62, 210, 211, 212, 234, 194, 195,
- 198, 0, 138, 121, 0, 0, 0, 0, 127, 139,
- 0, 119, 138, 0, 0, 113, 114, 115, 0, 0,
- 0, 185, 0, 86, 87, 88, 89, 90, 0, 213,
- 0, 275, 237, 0, 196, 137, 96, 133, 135, 0,
- 0, 0, 0, 0, 0, 126, 0, 187, 189, 156,
- 157, 154, 155, 158, 153, 149, 150, 1, 2, 3,
- 4, 5, 6, 7, 8, 9, 13, 14, 15, 10,
- 11, 12, 0, 0, 0, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 152, 151,
- 109, 91, 132, 131, 0, 207, 208, 209, 274, 260,
- 0, 0, 0, 0, 85, 247, 248, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 236, 85, 251, 0, 273, 197, 130, 0,
- 100, 0, 0, 129, 0, 140, 100, 109, 109, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 0,
- 52, 53, 48, 49, 50, 51, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
- 0, 0, 142, 170, 0, 0, 0, 146, 0, 143,
- 0, 0, 0, 0, 186, 0, 259, 241, 0, 240,
- 0, 0, 54, 0, 0, 0, 0, 104, 104, 280,
- 0, 0, 271, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 92, 93, 94, 95, 97, 136,
- 134, 123, 124, 125, 128, 122, 188, 190, 0, 0,
- 257, 0, 0, 0, 0, 0, 141, 127, 139, 0,
- 144, 145, 0, 0, 0, 0, 0, 111, 109, 205,
- 216, 217, 218, 223, 219, 220, 221, 222, 214, 0,
- 225, 232, 231, 233, 0, 242, 0, 0, 0, 0,
- 0, 276, 0, 278, 257, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 98, 99,
- 101, 0, 0, 0, 0, 0, 0, 0, 169, 148,
- 0, 0, 0, 0, 106, 112, 110, 204, 96, 202,
- 0, 215, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 283, 0, 0, 0, 267, 268, 0, 0,
- 0, 0, 265, 0, 281, 0, 0, 0, 0, 160,
- 0, 0, 0, 0, 147, 0, 0, 0, 60, 0,
- 100, 0, 224, 0, 0, 256, 0, 0, 104, 105,
- 104, 0, 0, 0, 0, 0, 261, 262, 256, 0,
- 0, 0, 258, 0, 166, 0, 0, 162, 163, 159,
- 59, 201, 203, 96, 107, 0, 0, 0, 0, 0,
- 263, 264, 0, 277, 279, 0, 0, 266, 269, 270,
- 0, 282, 164, 165, 0, 0, 0, 60, 108, 102,
- 226, 0, 0, 96, 0, 100, 252, 0, 100, 161,
- 167, 168, 200, 0, 206, 0, 245, 0, 0, 254,
- 0, 0, 253, 272, 103, 243, 0, 244, 0, 96,
- 0, 0, 0, 255, 0, 0, 0, 0, 250, 0,
- 0, 249, 0, 246, 0, 0, 0
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned short int yyprhs[] =
+{
+ 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
+ 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
+ 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
+ 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
+ 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
+ 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
+ 119, 121, 122, 125, 126, 128, 130, 133, 134, 136,
+ 138, 140, 142, 144, 146, 148, 150, 151, 153, 154,
+ 156, 158, 159, 161, 163, 165, 167, 168, 170, 172,
+ 174, 176, 178, 181, 183, 185, 187, 189, 190, 193,
+ 195, 197, 198, 201, 202, 205, 206, 210, 213, 214,
+ 216, 217, 221, 223, 226, 228, 230, 232, 234, 236,
+ 238, 241, 243, 246, 252, 258, 264, 270, 274, 277,
+ 283, 288, 291, 293, 295, 297, 301, 303, 307, 309,
+ 310, 312, 316, 321, 325, 329, 334, 339, 343, 350,
+ 356, 359, 362, 365, 368, 371, 374, 377, 380, 383,
+ 386, 393, 399, 408, 415, 422, 430, 438, 445, 454,
+ 463, 467, 469, 471, 473, 475, 476, 478, 481, 482,
+ 486, 487, 491, 495, 497, 501, 505, 506, 513, 514,
+ 522, 523, 531, 534, 538, 540, 544, 548, 552, 556,
+ 558, 559, 565, 569, 571, 575, 577, 578, 588, 590,
+ 592, 597, 599, 601, 604, 608, 609, 611, 613, 615,
+ 617, 619, 621, 623, 625, 627, 631, 633, 639, 641,
+ 643, 645, 647, 649, 651, 654, 657, 660, 664, 667,
+ 668, 670, 673, 676, 680, 690, 700, 709, 724, 726,
+ 728, 735, 741, 744, 751, 759, 763, 769, 770, 771,
+ 775, 778, 780, 786, 792, 799, 806, 811, 818, 823,
+ 828, 835, 842, 845, 854, 856, 858, 859, 863, 870,
+ 874, 881, 884, 889, 896
};
-static const short yydefgoto[] = { 186,
- 187, 188, 250, 267, 109, 110, 70, 482, 12, 71,
- 14, 36, 37, 38, 42, 48, 119, 319, 229, 391,
- 322, 525, 372, 348, 510, 285, 349, 72, 111, 128,
- 195, 129, 130, 101, 274, 361, 275, 79, 555, 15,
- 16, 18, 17, 191, 238, 239, 57, 21, 55, 92,
- 410, 411, 120, 198, 49, 87, 50, 43, 413, 362,
- 74, 364, 290, 51, 83, 84, 223, 529, 123, 303,
- 490, 394, 224, 225, 226, 227
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const short int yyrhs[] =
+{
+ 186, 0, -1, 66, -1, 67, -1, 68, -1, 69,
+ -1, 70, -1, 71, -1, 72, -1, 73, -1, 74,
+ -1, 78, -1, 79, -1, 80, -1, 75, -1, 76,
+ -1, 77, -1, 109, -1, 110, -1, 111, -1, 112,
+ -1, 113, -1, 114, -1, 115, -1, 116, -1, 117,
+ -1, 118, -1, 119, -1, 120, -1, 83, -1, 84,
+ -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
+ -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
+ -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
+ -1, 100, -1, 101, -1, 102, -1, 89, -1, 90,
+ -1, 91, -1, 92, -1, 21, -1, 22, -1, 9,
+ -1, 10, -1, 11, -1, 14, -1, 17, -1, 154,
+ -1, -1, 154, 132, -1, -1, 15, -1, 18, -1,
+ 157, 132, -1, -1, 35, -1, 37, -1, 36, -1,
+ 38, -1, 40, -1, 39, -1, 41, -1, 43, -1,
+ -1, 131, -1, -1, 39, -1, 41, -1, -1, 35,
+ -1, 36, -1, 37, -1, 40, -1, -1, 54, -1,
+ 55, -1, 56, -1, 57, -1, 58, -1, 53, 4,
+ -1, 110, -1, 111, -1, 128, -1, 129, -1, -1,
+ 166, 165, -1, 127, -1, 165, -1, -1, 168, 167,
+ -1, -1, 46, 4, -1, -1, 133, 46, 4, -1,
+ 29, 17, -1, -1, 171, -1, -1, 133, 174, 173,
+ -1, 171, -1, 46, 4, -1, 9, -1, 10, -1,
+ 11, -1, 12, -1, 42, -1, 175, -1, 176, 134,
+ -1, 208, -1, 135, 4, -1, 176, 136, 180, 137,
+ 168, -1, 8, 136, 180, 137, 168, -1, 138, 4,
+ 139, 176, 140, -1, 141, 4, 139, 176, 142, -1,
+ 143, 181, 144, -1, 143, 144, -1, 141, 143, 181,
+ 144, 142, -1, 141, 143, 144, 142, -1, 176, 166,
+ -1, 176, -1, 8, -1, 177, -1, 179, 133, 177,
+ -1, 179, -1, 179, 133, 32, -1, 32, -1, -1,
+ 176, -1, 181, 133, 176, -1, 176, 138, 184, 140,
+ -1, 176, 138, 140, -1, 176, 145, 17, -1, 176,
+ 141, 184, 142, -1, 176, 143, 184, 144, -1, 176,
+ 143, 144, -1, 176, 141, 143, 184, 144, 142, -1,
+ 176, 141, 143, 144, 142, -1, 176, 33, -1, 176,
+ 34, -1, 176, 208, -1, 176, 183, -1, 176, 20,
+ -1, 152, 3, -1, 152, 4, -1, 9, 21, -1,
+ 9, 22, -1, 153, 7, -1, 149, 136, 182, 31,
+ 176, 137, -1, 108, 136, 182, 219, 137, -1, 122,
+ 136, 182, 133, 182, 133, 182, 137, -1, 147, 136,
+ 182, 133, 182, 137, -1, 148, 136, 182, 133, 182,
+ 137, -1, 81, 150, 136, 182, 133, 182, 137, -1,
+ 82, 151, 136, 182, 133, 182, 137, -1, 124, 136,
+ 182, 133, 182, 137, -1, 125, 136, 182, 133, 182,
+ 133, 182, 137, -1, 126, 136, 182, 133, 182, 133,
+ 182, 137, -1, 184, 133, 182, -1, 182, -1, 27,
+ -1, 28, -1, 187, -1, -1, 188, -1, 187, 188,
+ -1, -1, 26, 189, 204, -1, -1, 25, 190, 205,
+ -1, 51, 50, 194, -1, 19, -1, 156, 13, 176,
+ -1, 156, 13, 8, -1, -1, 158, 161, 185, 182,
+ 191, 173, -1, -1, 158, 159, 161, 185, 182, 192,
+ 173, -1, -1, 158, 160, 161, 185, 176, 193, 173,
+ -1, 44, 195, -1, 47, 132, 196, -1, 17, -1,
+ 45, 132, 17, -1, 59, 132, 17, -1, 138, 197,
+ 140, -1, 197, 133, 17, -1, 17, -1, -1, 198,
+ 133, 176, 166, 155, -1, 176, 166, 155, -1, 198,
+ -1, 198, 133, 32, -1, 32, -1, -1, 164, 178,
+ 157, 136, 199, 137, 168, 172, 169, -1, 23, -1,
+ 143, -1, 163, 161, 200, 201, -1, 24, -1, 144,
+ -1, 211, 203, -1, 162, 161, 200, -1, -1, 52,
+ -1, 3, -1, 4, -1, 7, -1, 21, -1, 22,
+ -1, 33, -1, 34, -1, 20, -1, 141, 184, 142,
+ -1, 183, -1, 50, 206, 17, 133, 17, -1, 5,
+ -1, 6, -1, 154, -1, 157, -1, 208, -1, 207,
+ -1, 176, 209, -1, 211, 212, -1, 202, 212, -1,
+ 213, 156, 214, -1, 213, 216, -1, -1, 16, -1,
+ 60, 210, -1, 60, 8, -1, 61, 12, 209, -1,
+ 61, 9, 209, 133, 12, 209, 133, 12, 209, -1,
+ 62, 152, 209, 133, 12, 209, 138, 215, 140, -1,
+ 62, 152, 209, 133, 12, 209, 138, 140, -1, 63,
+ 164, 178, 209, 136, 218, 137, 168, 31, 12, 209,
+ 64, 12, 209, -1, 64, -1, 65, -1, 215, 152,
+ 207, 133, 12, 209, -1, 152, 207, 133, 12, 209,
+ -1, 156, 221, -1, 176, 138, 209, 133, 209, 140,
+ -1, 217, 133, 138, 209, 133, 209, 140, -1, 176,
+ 209, 166, -1, 218, 133, 176, 209, 166, -1, -1,
+ -1, 219, 133, 210, -1, 49, 48, -1, 48, -1,
+ 147, 176, 209, 133, 209, -1, 148, 176, 209, 133,
+ 209, -1, 81, 150, 176, 209, 133, 209, -1, 82,
+ 151, 176, 209, 133, 209, -1, 149, 210, 31, 176,
+ -1, 122, 210, 133, 210, 133, 210, -1, 123, 210,
+ 133, 176, -1, 124, 210, 133, 210, -1, 125, 210,
+ 133, 210, 133, 210, -1, 126, 210, 133, 210, 133,
+ 210, -1, 121, 217, -1, 220, 164, 178, 209, 136,
+ 218, 137, 168, -1, 223, -1, 30, -1, -1, 103,
+ 176, 170, -1, 103, 176, 133, 9, 209, 170, -1,
+ 104, 176, 170, -1, 104, 176, 133, 9, 209, 170,
+ -1, 105, 210, -1, 222, 106, 176, 209, -1, 222,
+ 107, 210, 133, 176, 209, -1, 108, 176, 209, 219,
+ -1
};
-static const short yypact[] = { 438,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, 27, -119, -29,
- -84, 43, -57, -6, 525,-32768, 195, 140, -38, -27,
--32768, -39, 112,-32768, 828,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768, 32, 32, 227,-32768,-32768,
--32768, 32,-32768,-32768,-32768,-32768,-32768, 32, 119,-32768,
- -2, 188, 210, 213,-32768,-32768,-32768,-32768,-32768, 49,
--32768,-32768,-32768,-32768,-32768, 214, 245, 5, 104,-32768,
--32768,-32768, 110,-32768, 227, 227,-32768,-32768, 1043, 154,
- 154,-32768,-32768, 109,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, -89, 1085,-32768, 125, 139, 122, 49,-32768, 110,
- -55,-32768, 1085, 1043, 1188, 46, 249, 272, 266, 273,
- 589,-32768, 279,-32768,-32768,-32768,-32768,-32768, 1204,-32768,
- 2, 1327,-32768, 268,-32768,-32768, 110,-32768, 153, 150,
- 1188, 1188, 149, -53, 1188,-32768, 155,-32768, 110,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768, 494, 943, 157,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, 158, 159, 163,
- 164, 790, 1226, 495, 284, 166, 167, 169,-32768,-32768,
- 173,-32768, 49, 110, 28,-32768,-32768,-32768,-32768,-32768,
- 262, 1243, 142, 302, 154,-32768,-32768, 494, 943, 1188,
- 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188,
- 1188, 1188,-32768, 154,-32768, 168,-32768,-32768, -58, 1124,
--32768, 25, 16,-32768, 170, 110,-32768, 173, 173,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 177,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768, 181, 1043, 1043, 1043,
- 1043, 1043,-32768,-32768, 20, 668, -40,-32768, -48,-32768,
- 1043, 1043, 1043, 18,-32768, 182,-32768, 49, 747,-32768,
- 872, 872,-32768, 872, 1204, 1188, 1188, 99, 117,-32768,
- 747, 33, 186, 187, 191, 192, 198, 200, 747, 747,
- 290, 1204, 1188, 1188,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, -87,-32768,-32768,-32768, -87,-32768,-32768, 1043, 1043,
--32768, 203, 204, 205, 209, 1043,-32768, 202, 589, -43,
--32768,-32768, 216, 218, 312, 328, 342,-32768, 173, 1140,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 295, 1043,
--32768,-32768,-32768,-32768, 219,-32768, 229, 872, 747, 747,
- 8,-32768, 17,-32768,-32768, 872, 225, 1188, 1188, 1188,
- 1188, 1188, 231, 232, 1188, 872, 747, 233,-32768,-32768,
--32768, 234, 235, -33, 1043, 1043, 1043, 1043,-32768,-32768,
- 230, 1043, 1043, 1188,-32768,-32768,-32768,-32768, 110, 238,
- 236,-32768, 357, -36, 363, 364, 241, 246, 248, 872,
- 374, 872, 251, 254, 872, 255, 110,-32768, 256, 258,
- 872, 872, 110, 260,-32768, 1188, 1043, 1043, 1188,-32768,
- 261, 263, 264, 270,-32768, 267, 276, 47, 130, 1159,
--32768, 274,-32768, 872, 872, 1188, 872, 872, 281,-32768,
- 281, 872, 283, 1188, 1188, 1188,-32768,-32768, 1188, 747,
- 282, 285,-32768, 1043,-32768, 1043, 1043,-32768,-32768,-32768,
--32768,-32768,-32768, 110, 45, 382, 287, 280, 747, -13,
--32768,-32768, 355,-32768,-32768, 265, 872,-32768,-32768,-32768,
- 29,-32768,-32768,-32768, 286, 291, 292, 130,-32768, 375,
--32768, 412, 1,-32768, 1188,-32768,-32768, 293,-32768,-32768,
--32768,-32768,-32768, 423,-32768, 872,-32768, 996, 9, -58,
- 747, 212,-32768, -87,-32768,-32768, 297,-32768, 996,-32768,
- 419, 422, 303, -58, 872, 872, 425, 371,-32768, 872,
- 427,-32768, 872,-32768, 443, 444,-32768
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned short int yyrline[] =
+{
+ 0, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048,
+ 1048, 1049, 1049, 1049, 1049, 1049, 1049, 1050, 1050, 1050,
+ 1050, 1050, 1050, 1051, 1051, 1051, 1051, 1051, 1051, 1054,
+ 1054, 1055, 1055, 1056, 1056, 1057, 1057, 1058, 1058, 1062,
+ 1062, 1063, 1063, 1064, 1064, 1065, 1065, 1066, 1066, 1067,
+ 1067, 1068, 1068, 1069, 1070, 1075, 1076, 1076, 1078, 1078,
+ 1079, 1079, 1083, 1087, 1092, 1092, 1094, 1098, 1104, 1105,
+ 1106, 1107, 1108, 1112, 1113, 1114, 1118, 1119, 1123, 1124,
+ 1125, 1129, 1130, 1131, 1132, 1133, 1136, 1137, 1138, 1139,
+ 1140, 1141, 1142, 1149, 1150, 1151, 1152, 1155, 1156, 1161,
+ 1162, 1165, 1166, 1173, 1174, 1180, 1181, 1189, 1197, 1198,
+ 1203, 1204, 1205, 1210, 1223, 1223, 1223, 1223, 1226, 1230,
+ 1234, 1241, 1246, 1254, 1272, 1290, 1295, 1307, 1317, 1321,
+ 1331, 1338, 1345, 1352, 1357, 1362, 1369, 1370, 1377, 1384,
+ 1392, 1397, 1408, 1436, 1452, 1481, 1509, 1534, 1553, 1578,
+ 1597, 1609, 1616, 1682, 1692, 1702, 1708, 1714, 1719, 1724,
+ 1732, 1744, 1766, 1774, 1780, 1791, 1796, 1801, 1807, 1813,
+ 1822, 1826, 1834, 1834, 1845, 1850, 1858, 1859, 1863, 1863,
+ 1867, 1867, 1870, 1873, 1885, 1909, 1920, 1920, 1930, 1930,
+ 1938, 1938, 1948, 1951, 1957, 1970, 1974, 1979, 1981, 1986,
+ 1991, 2000, 2010, 2021, 2025, 2034, 2043, 2048, 2160, 2160,
+ 2162, 2171, 2171, 2173, 2178, 2190, 2194, 2199, 2203, 2207,
+ 2211, 2215, 2219, 2223, 2227, 2231, 2256, 2260, 2274, 2278,
+ 2282, 2286, 2292, 2292, 2298, 2307, 2311, 2320, 2330, 2339,
+ 2351, 2364, 2368, 2372, 2377, 2387, 2406, 2415, 2482, 2486,
+ 2493, 2504, 2517, 2527, 2538, 2548, 2556, 2564, 2567, 2568,
+ 2575, 2579, 2584, 2605, 2622, 2635, 2648, 2660, 2668, 2675,
+ 2681, 2687, 2693, 2708, 2772, 2777, 2781, 2788, 2795, 2803,
+ 2810, 2818, 2826, 2840, 2857
};
+#endif
-static const short yypgoto[] = { 324,
- 325, 326, 242, 252, -197,-32768, 0, -50, 376, 4,
--32768,-32768,-32768, 40,-32768,-32768, -167, -306, -397,-32768,
- -235,-32768, -291, -23,-32768, -211,-32768,-32768, -24, 237,
- -229,-32768, 362, 369, -68, -108, -178, 201,-32768,-32768,
- 453,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768, 391,-32768,-32768,-32768,-32768,-32768,-32768, -436,
- -72, 101, -157,-32768, 424,-32768,-32768,-32768,-32768,-32768,
- 7, 105,-32768,-32768,-32768,-32768
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL",
+ "LOCALVAL_ID", "GLOBALVAL_ID", "FPVAL", "VOID", "INTTYPE", "FLOAT",
+ "DOUBLE", "LABEL", "TYPE", "LOCALVAR", "GLOBALVAR", "LABELSTR",
+ "STRINGCONSTANT", "ATSTRINGCONSTANT", "IMPLEMENTATION",
+ "ZEROINITIALIZER", "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK",
+ "DECLARE", "DEFINE", "GLOBAL", "CONSTANT", "SECTION", "VOLATILE", "TO",
+ "DOTDOTDOT", "NULL_TOK", "UNDEF", "INTERNAL", "LINKONCE", "WEAK",
+ "APPENDING", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE",
+ "EXTERNAL", "TARGET", "TRIPLE", "ALIGN", "DEPLIBS", "CALL", "TAIL",
+ "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK", "CCC_TOK", "FASTCC_TOK",
+ "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
+ "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB",
+ "MUL", "UDIV", "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR",
+ "XOR", "SHL", "LSHR", "ASHR", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT",
+ "SLE", "SGE", "ULT", "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT",
+ "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE", "MALLOC", "ALLOCA", "FREE",
+ "LOAD", "STORE", "GETELEMENTPTR", "TRUNC", "ZEXT", "SEXT", "FPTRUNC",
+ "FPEXT", "BITCAST", "UITOFP", "SITOFP", "FPTOUI", "FPTOSI", "INTTOPTR",
+ "PTRTOINT", "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT",
+ "INSERTELEMENT", "SHUFFLEVECTOR", "NORETURN", "INREG", "SRET", "DEFAULT",
+ "HIDDEN", "'='", "','", "'*'", "'\\\\'", "'('", "')'", "'['", "'x'",
+ "']'", "'<'", "'>'", "'{'", "'}'", "'c'", "$accept", "ArithmeticOps",
+ "LogicalOps", "CastOps", "IPredicates", "FPredicates", "IntType",
+ "FPType", "LocalName", "OptLocalName", "OptLocalAssign", "GlobalName",
+ "OptGlobalAssign", "GVInternalLinkage", "GVExternalLinkage",
+ "GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage",
+ "OptCallingConv", "ParamAttr", "OptParamAttrs", "FuncAttr",
+ "OptFuncAttrs", "OptAlign", "OptCAlign", "SectionString", "OptSection",
+ "GlobalVarAttributes", "GlobalVarAttribute", "PrimType", "Types",
+ "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI", "TypeListI",
+ "ConstVal", "ConstExpr", "ConstVector", "GlobalType", "Module",
+ "DefinitionList", "Definition", "@1", "@2", "@3", "@4", "@5", "AsmBlock",
+ "TargetDefinition", "LibrariesDefinition", "LibList", "ArgListH",
+ "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", "END",
+ "Function", "FunctionProto", "OptSideEffect", "ConstValueRef",
+ "SymbolicValueRef", "ValueRef", "ResolvedVal", "BasicBlockList",
+ "BasicBlock", "InstructionList", "BBTerminatorInst", "JumpTable", "Inst",
+ "PHIList", "ValueRefList", "IndexList", "OptTailCall", "InstVal",
+ "OptVolatile", "MemoryInst", 0
};
+#endif
-
-#define YYLAST 1453
-
-
-static const short yytable[] = { 11,
- 73, 326, 189, 13, 277, 279, 294, 374, 96, 293,
- 112, 449, 22, 82, 11, 390, 420, 293, 13, 390,
- 23, 85, 315, 316, 196, 422, 327, 328, 27, 28,
- 29, 30, 31, 32, 33, 138, 34, 295, 190, 389,
- 317, 318, 2, 124, 100, 4, 346, 24, -54, -54,
- 125, 315, 316, 421, 300, 25, 312, 304, 305, 306,
- 307, 308, 421, 347, 311, 368, 140, 141, 127, 317,
- 318, 19, 100, 346, 26, 75, 76, 135, 127, 135,
- 139, 80, 386, 11, 336, 20, 508, 81, 136, 336,
- 235, 537, 336, 52, 194, 342, 336, 340, 54, 439,
- 401, 341, 543, 440, 53, 453, 232, 233, 58, 59,
- 236, 98, 61, 62, 63, 64, 530, 1, 2, 515,
- 3, 4, 1, 516, 35, 3, 58, 59, 56, 98,
- 61, 62, 63, 64, 82, 1, 2, 407, 3, 4,
- 527, 86, 544, 1, 197, 65, 3, 97, 538, 102,
- 291, 103, 336, 292, 315, 316, 388, 324, 102, 337,
- 103, 515, 35, 65, 323, 519, 102, 494, 103, 495,
- 376, 389, 317, 318, 44, 45, 46, 289, 390, 47,
- 102, 414, 103, 480, 93, 298, 299, 289, 301, 302,
- 289, 289, 289, 289, 289, 309, 310, 289, 286, 331,
- 332, 333, 334, 335, 89, 127, 113, 114, 115, 116,
- 117, 118, 343, 344, 345, 485, 363, 94, 363, 363,
- 426, 363, 428, 429, 430, 390, 90, 390, 363, 91,
- 189, 371, 102, 40, 103, 41, 363, 363, 66, 315,
- 316, 67, 541, 102, 68, 103, 69, 99, 95, 373,
- 102, 339, 103, 77, 78, -55, 66, 317, 318, 67,
- 392, 393, 68, 131, 69, 133, 190, 399, 142, 143,
- 194, 369, 370, 313, 314, 104, 105, 132, -56, 144,
- 532, 473, 192, 534, 228, 230, 231, 194, 387, 289,
- 234, 237, 268, 269, 270, 363, 363, 363, 271, 272,
- 280, 281, 282, 363, 283, 284, 498, 499, 500, 287,
- 293, 325, 329, 363, 363, 528, 330, 350, 377, 378,
- 385, 315, 316, 379, 380, 409, 441, 442, 443, 444,
- 381, 539, 382, 446, 447, 395, 396, 397, 389, 317,
- 318, 398, 404, 400, 405, 406, 412, 363, 402, 363,
- 403, 415, 363, 289, 427, 289, 289, 289, 363, 363,
- 433, 416, 425, 431, 432, 436, 437, 438, 471, 472,
- 450, 445, 451, 452, 454, 455, 456, 460, 457, 448,
- 458, 363, 363, 439, 363, 363, 462, 464, 465, 363,
- 466, 365, 366, 474, 367, 469, 476, 363, 511, 475,
- 421, 375, 477, 478, 517, 505, 486, 506, 507, 383,
- 384, 470, 479, 493, 289, 497, 363, 513, 503, 512,
- 524, 504, 520, 526, 363, 484, 535, 521, 522, 542,
- 545, 489, 533, 546, 551, 547, 550, -174, 553, 289,
- 289, 289, 556, 557, 489, 220, 221, 222, 481, 296,
- -62, 1, 2, 363, 3, 4, 5, 523, 363, 122,
- 297, 509, 6, 7, 137, 134, 321, 39, 417, 418,
- 419, 121, 363, 363, 88, 501, 424, 363, 0, 423,
- 363, 8, 0, 0, 9, 0, 434, 435, 10, 0,
- 531, 0, 0, 0, 0, 0, 0, 0, 0, 58,
- 59, 0, 98, 106, 107, 108, 64, 481, 1, 2,
- 0, 3, 4, 0, 0, 0, 0, 0, 0, 0,
- 459, 0, 461, 0, -173, 463, 0, 0, 0, 0,
- 0, 467, 468, 0, 0, 0, 65, -62, 1, 2,
- 0, 3, 4, 5, 0, 0, 0, 0, 0, 6,
- 7, 0, 0, 0, 487, 488, 0, 491, 492, 0,
- 0, 0, 496, 0, 0, 0, 0, 0, 8, 0,
- 502, 9, 0, 0, 0, 10, 240, 241, 242, 243,
- 244, 245, 246, 247, 248, 249, 0, 0, 0, 514,
- 0, 0, 0, 58, 59, 0, 0, 518, 0, 0,
- 0, 0, 1, 2, 0, 3, 4, 0, 145, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 146, 147, 0, 0, 0, 536, 0, 0, 66,
- 0, 540, 67, 0, 0, 68, 0, 69, 278, 0,
- 0, 0, 0, 0, 0, 548, 549, 0, 0, 0,
- 552, 0, 0, 554, 148, 149, 150, 151, 152, 153,
- 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
- 164, 0, 58, 59, 0, 98, 106, 107, 108, 64,
- 0, 1, 2, 0, 3, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 165, 166, 167, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 65,
- 178, 0, 179, 180, 181, 0, 0, 0, 0, 0,
- 0, 0, 102, 0, 103, 0, 182, 0, 0, 183,
- 0, 184, 0, 185, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 351,
- 352, 58, 59, 353, 0, 0, 0, 0, 0, 0,
- 1, 2, 0, 3, 4, 0, 354, 355, 356, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 357,
- 358, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 58, 59, 359, 98, 106, 107,
- 108, 64, 66, 1, 2, 67, 3, 4, 68, 0,
- 69, 338, 148, 149, 150, 151, 152, 153, 154, 155,
- 156, 157, 158, 159, 160, 161, 162, 163, 164, 0,
- 0, 65, 58, 59, 0, 60, 61, 62, 63, 64,
- 0, 1, 2, 0, 3, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 165, 166, 167, 168, 169, 170,
- 171, 172, 173, 174, 175, 176, 177, 0, 178, 65,
- 179, 180, 181, 0, 351, 352, 58, 59, 353, 0,
- 102, 0, 103, 0, 0, 1, 2, 360, 3, 4,
- 0, 354, 355, 356, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 357, 358, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 359, 0, 0, 66, 0, 0, 67, 0, 273,
- 68, 0, 69, 0, 0, 0, 0, 148, 149, 150,
- 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
- 161, 162, 163, 164, 0, 0, 0, 0, 0, 0,
- 0, 0, 66, 251, 252, 67, 0, 0, 68, 0,
- 69, 0, 0, 0, 0, 0, 0, 0, 0, 165,
- 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
- 176, 177, 0, 178, 0, 179, 180, 181, 351, 352,
- 0, 0, 353, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 360, 0, 0, 354, 355, 356, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 357, 358,
- 0, 253, 254, 255, 256, 257, 258, 259, 260, 261,
- 262, 263, 264, 265, 266, 359, 0, 58, 59, 0,
- 98, 106, 107, 108, 64, 0, 1, 2, 0, 3,
- 4, 148, 149, 150, 151, 152, 153, 154, 155, 156,
- 157, 158, 159, 160, 161, 162, 163, 164, 0, 0,
- 0, 0, 0, 0, 65, 0, 0, 0, 0, 58,
- 59, 0, 98, 61, 62, 63, 64, 0, 1, 2,
- 0, 3, 4, 165, 166, 167, 168, 169, 170, 171,
- 172, 173, 174, 175, 176, 177, 126, 178, 0, 179,
- 180, 181, 0, 0, 0, 0, 65, 0, 58, 59,
- 0, 98, 61, 62, 63, 64, 360, 1, 2, 0,
- 3, 4, 0, 0, 58, 59, 0, 98, 61, 62,
- 63, 64, 0, 1, 2, 320, 3, 4, 0, 0,
- 0, 0, 0, 58, 59, 65, 98, 61, 62, 63,
- 64, 408, 1, 2, 0, 3, 4, 66, 0, 0,
- 67, 65, 0, 68, 0, 69, 0, 0, 0, 0,
- 483, 0, 58, 59, 0, 98, 61, 62, 63, 64,
- 65, 1, 2, 0, 3, 4, 0, 0, 58, 59,
- 0, 193, 61, 62, 63, 64, 0, 1, 2, 66,
- 3, 4, 67, 0, 0, 68, 0, 69, 0, 65,
- 58, 59, 0, 98, 106, 107, 108, 64, 0, 1,
- 2, 0, 3, 4, 0, 65, 0, 58, 59, 0,
- 288, 61, 62, 63, 64, 0, 1, 2, 66, 3,
- 4, 67, 0, 0, 68, 0, 69, 65, 0, 0,
- 0, 0, 0, 0, 66, 0, 0, 67, 0, 0,
- 68, 0, 69, 0, 65, 0, 0, 0, 0, 0,
- 0, 0, 0, 66, 0, 0, 67, 0, 0, 68,
- 0, 69, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 66, 0, 0, 67, 0, 0, 68, 0,
- 69, 0, 0, 0, 0, 0, 0, 0, 66, 0,
- 0, 67, 0, 0, 68, 0, 69, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 199, 0, 0, 0,
- 66, 0, 0, 67, 0, 0, 68, 0, 276, 0,
- 0, 0, 0, 0, 200, 201, 0, 66, 0, 0,
- 67, 0, 0, 68, 0, 69, 202, 203, 204, 205,
- 206, 207, 148, 149, 150, 151, 152, 153, 154, 155,
- 156, 157, 158, 159, 160, 161, 162, 208, 209, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 210,
- 211, 212, 0, 0, 213, 166, 167, 168, 169, 170,
- 171, 172, 173, 174, 175, 176, 177, 214, 215, 216,
- 217, 218, 219
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short int yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 61, 44, 42, 92, 40, 41, 91, 120,
+ 93, 60, 62, 123, 125, 99
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 146, 147, 147, 147, 147, 147, 147, 147, 147,
+ 147, 148, 148, 148, 148, 148, 148, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 151,
+ 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
+ 151, 151, 151, 151, 151, 152, 153, 153, 154, 154,
+ 155, 155, 156, 156, 157, 157, 158, 158, 159, 159,
+ 159, 159, 159, 160, 160, 160, 161, 161, 162, 162,
+ 162, 163, 163, 163, 163, 163, 164, 164, 164, 164,
+ 164, 164, 164, 165, 165, 165, 165, 166, 166, 167,
+ 167, 168, 168, 169, 169, 170, 170, 171, 172, 172,
+ 173, 173, 174, 174, 175, 175, 175, 175, 176, 176,
+ 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
+ 176, 177, 178, 178, 179, 179, 180, 180, 180, 180,
+ 181, 181, 182, 182, 182, 182, 182, 182, 182, 182,
+ 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
+ 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
+ 184, 184, 185, 185, 186, 186, 187, 187, 189, 188,
+ 190, 188, 188, 188, 188, 188, 191, 188, 192, 188,
+ 193, 188, 188, 188, 194, 195, 195, 196, 197, 197,
+ 197, 198, 198, 199, 199, 199, 199, 200, 201, 201,
+ 202, 203, 203, 204, 205, 206, 206, 207, 207, 207,
+ 207, 207, 207, 207, 207, 207, 207, 207, 208, 208,
+ 208, 208, 209, 209, 210, 211, 211, 212, 213, 213,
+ 213, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ 215, 215, 216, 217, 217, 218, 218, 218, 219, 219,
+ 220, 220, 221, 221, 221, 221, 221, 221, 221, 221,
+ 221, 221, 221, 221, 221, 222, 222, 223, 223, 223,
+ 223, 223, 223, 223, 223
};
-static const short yycheck[] = { 0,
- 25, 237, 111, 0, 183, 184, 204, 299, 4, 9,
- 79, 409, 132, 16, 15, 322, 9, 9, 15, 326,
- 50, 24, 110, 111, 23, 9, 238, 239, 35, 36,
- 37, 38, 39, 40, 41, 104, 43, 205, 111, 127,
- 128, 129, 15, 133, 69, 18, 29, 132, 3, 4,
- 140, 110, 111, 46, 212, 13, 224, 215, 216, 217,
- 218, 219, 46, 46, 222, 295, 21, 22, 93, 128,
- 129, 45, 97, 29, 132, 36, 37, 133, 103, 133,
- 105, 42, 312, 84, 133, 59, 484, 48, 144, 133,
- 144, 528, 133, 132, 119, 144, 133, 276, 138, 133,
- 144, 142, 539, 137, 132, 142, 131, 132, 5, 6,
- 135, 8, 9, 10, 11, 12, 514, 14, 15, 133,
- 17, 18, 14, 137, 131, 17, 5, 6, 17, 8,
- 9, 10, 11, 12, 16, 14, 15, 349, 17, 18,
- 140, 144, 540, 14, 143, 42, 17, 143, 140, 134,
- 9, 136, 133, 12, 110, 111, 314, 142, 134, 140,
- 136, 133, 131, 42, 140, 137, 134, 459, 136, 461,
- 138, 127, 128, 129, 35, 36, 37, 202, 485, 40,
- 134, 360, 136, 137, 136, 210, 211, 212, 213, 214,
- 215, 216, 217, 218, 219, 220, 221, 222, 195, 268,
- 269, 270, 271, 272, 17, 230, 53, 54, 55, 56,
- 57, 58, 281, 282, 283, 451, 289, 4, 291, 292,
- 378, 294, 380, 381, 382, 532, 17, 534, 301, 17,
- 339, 133, 134, 39, 136, 41, 309, 310, 135, 110,
- 111, 138, 31, 134, 141, 136, 143, 144, 4, 133,
- 134, 276, 136, 27, 28, 7, 135, 128, 129, 138,
- 329, 330, 141, 139, 143, 144, 339, 336, 3, 4,
- 295, 296, 297, 106, 107, 75, 76, 139, 7, 7,
- 516, 439, 4, 519, 17, 133, 137, 312, 313, 314,
- 142, 137, 136, 136, 136, 368, 369, 370, 136, 136,
- 17, 136, 136, 376, 136, 133, 464, 465, 466, 48,
- 9, 142, 136, 386, 387, 513, 136, 136, 133, 133,
- 31, 110, 111, 133, 133, 350, 395, 396, 397, 398,
- 133, 529, 133, 402, 403, 133, 133, 133, 127, 128,
- 129, 133, 31, 142, 17, 4, 52, 420, 133, 422,
- 133, 133, 425, 378, 379, 380, 381, 382, 431, 432,
- 385, 133, 138, 133, 133, 133, 133, 133, 437, 438,
- 133, 142, 137, 17, 12, 12, 136, 4, 133, 404,
- 133, 454, 455, 133, 457, 458, 133, 133, 133, 462,
- 133, 291, 292, 133, 294, 136, 133, 470, 17, 137,
- 46, 301, 133, 137, 140, 474, 133, 476, 477, 309,
- 310, 436, 137, 133, 439, 133, 489, 138, 137, 133,
- 46, 137, 137, 12, 497, 450, 4, 137, 137, 133,
- 12, 456, 140, 12, 64, 133, 12, 0, 12, 464,
- 465, 466, 0, 0, 469, 122, 122, 122, 449, 208,
- 13, 14, 15, 526, 17, 18, 19, 508, 531, 84,
- 209, 485, 25, 26, 103, 97, 230, 15, 368, 369,
- 370, 81, 545, 546, 51, 469, 376, 550, -1, 375,
- 553, 44, -1, -1, 47, -1, 386, 387, 51, -1,
- 515, -1, -1, -1, -1, -1, -1, -1, -1, 5,
- 6, -1, 8, 9, 10, 11, 12, 508, 14, 15,
- -1, 17, 18, -1, -1, -1, -1, -1, -1, -1,
- 420, -1, 422, -1, 0, 425, -1, -1, -1, -1,
- -1, 431, 432, -1, -1, -1, 42, 13, 14, 15,
- -1, 17, 18, 19, -1, -1, -1, -1, -1, 25,
- 26, -1, -1, -1, 454, 455, -1, 457, 458, -1,
- -1, -1, 462, -1, -1, -1, -1, -1, 44, -1,
- 470, 47, -1, -1, -1, 51, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, -1, -1, -1, 489,
- -1, -1, -1, 5, 6, -1, -1, 497, -1, -1,
- -1, -1, 14, 15, -1, 17, 18, -1, 20, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 33, 34, -1, -1, -1, 526, -1, -1, 135,
- -1, 531, 138, -1, -1, 141, -1, 143, 144, -1,
- -1, -1, -1, -1, -1, 545, 546, -1, -1, -1,
- 550, -1, -1, 553, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, -1, 5, 6, -1, 8, 9, 10, 11, 12,
- -1, 14, 15, -1, 17, 18, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 108, 109, 110, 111,
- 112, 113, 114, 115, 116, 117, 118, 119, 120, 42,
- 122, -1, 124, 125, 126, -1, -1, -1, -1, -1,
- -1, -1, 134, -1, 136, -1, 138, -1, -1, 141,
- -1, 143, -1, 145, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
- 4, 5, 6, 7, -1, -1, -1, -1, -1, -1,
- 14, 15, -1, 17, 18, -1, 20, 21, 22, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 33,
- 34, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 5, 6, 50, 8, 9, 10,
- 11, 12, 135, 14, 15, 138, 17, 18, 141, -1,
- 143, 144, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
- -1, 42, 5, 6, -1, 8, 9, 10, 11, 12,
- -1, 14, 15, -1, 17, 18, -1, -1, -1, -1,
- -1, -1, -1, -1, 108, 109, 110, 111, 112, 113,
- 114, 115, 116, 117, 118, 119, 120, -1, 122, 42,
- 124, 125, 126, -1, 3, 4, 5, 6, 7, -1,
- 134, -1, 136, -1, -1, 14, 15, 141, 17, 18,
- -1, 20, 21, 22, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 33, 34, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 50, -1, -1, 135, -1, -1, 138, -1, 140,
- 141, -1, 143, -1, -1, -1, -1, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, -1, -1, -1, -1, -1, -1,
- -1, -1, 135, 21, 22, 138, -1, -1, 141, -1,
- 143, -1, -1, -1, -1, -1, -1, -1, -1, 108,
- 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
- 119, 120, -1, 122, -1, 124, 125, 126, 3, 4,
- -1, -1, 7, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 141, -1, -1, 20, 21, 22, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 33, 34,
- -1, 89, 90, 91, 92, 93, 94, 95, 96, 97,
- 98, 99, 100, 101, 102, 50, -1, 5, 6, -1,
- 8, 9, 10, 11, 12, -1, 14, 15, -1, 17,
- 18, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
- -1, -1, -1, -1, 42, -1, -1, -1, -1, 5,
- 6, -1, 8, 9, 10, 11, 12, -1, 14, 15,
- -1, 17, 18, 108, 109, 110, 111, 112, 113, 114,
- 115, 116, 117, 118, 119, 120, 32, 122, -1, 124,
- 125, 126, -1, -1, -1, -1, 42, -1, 5, 6,
- -1, 8, 9, 10, 11, 12, 141, 14, 15, -1,
- 17, 18, -1, -1, 5, 6, -1, 8, 9, 10,
- 11, 12, -1, 14, 15, 32, 17, 18, -1, -1,
- -1, -1, -1, 5, 6, 42, 8, 9, 10, 11,
- 12, 32, 14, 15, -1, 17, 18, 135, -1, -1,
- 138, 42, -1, 141, -1, 143, -1, -1, -1, -1,
- 32, -1, 5, 6, -1, 8, 9, 10, 11, 12,
- 42, 14, 15, -1, 17, 18, -1, -1, 5, 6,
- -1, 8, 9, 10, 11, 12, -1, 14, 15, 135,
- 17, 18, 138, -1, -1, 141, -1, 143, -1, 42,
- 5, 6, -1, 8, 9, 10, 11, 12, -1, 14,
- 15, -1, 17, 18, -1, 42, -1, 5, 6, -1,
- 8, 9, 10, 11, 12, -1, 14, 15, 135, 17,
- 18, 138, -1, -1, 141, -1, 143, 42, -1, -1,
- -1, -1, -1, -1, 135, -1, -1, 138, -1, -1,
- 141, -1, 143, -1, 42, -1, -1, -1, -1, -1,
- -1, -1, -1, 135, -1, -1, 138, -1, -1, 141,
- -1, 143, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 135, -1, -1, 138, -1, -1, 141, -1,
- 143, -1, -1, -1, -1, -1, -1, -1, 135, -1,
- -1, 138, -1, -1, 141, -1, 143, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 30, -1, -1, -1,
- 135, -1, -1, 138, -1, -1, 141, -1, 143, -1,
- -1, -1, -1, -1, 48, 49, -1, 135, -1, -1,
- 138, -1, -1, 141, -1, 143, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, 82, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 103,
- 104, 105, -1, -1, 108, 109, 110, 111, 112, 113,
- 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
- 124, 125, 126
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 2, 0, 1, 1, 2, 0, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
+ 1, 0, 1, 1, 1, 1, 0, 1, 1, 1,
+ 1, 1, 2, 1, 1, 1, 1, 0, 2, 1,
+ 1, 0, 2, 0, 2, 0, 3, 2, 0, 1,
+ 0, 3, 1, 2, 1, 1, 1, 1, 1, 1,
+ 2, 1, 2, 5, 5, 5, 5, 3, 2, 5,
+ 4, 2, 1, 1, 1, 3, 1, 3, 1, 0,
+ 1, 3, 4, 3, 3, 4, 4, 3, 6, 5,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 6, 5, 8, 6, 6, 7, 7, 6, 8, 8,
+ 3, 1, 1, 1, 1, 0, 1, 2, 0, 3,
+ 0, 3, 3, 1, 3, 3, 0, 6, 0, 7,
+ 0, 7, 2, 3, 1, 3, 3, 3, 3, 1,
+ 0, 5, 3, 1, 3, 1, 0, 9, 1, 1,
+ 4, 1, 1, 2, 3, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 1, 5, 1, 1,
+ 1, 1, 1, 1, 2, 2, 2, 3, 2, 0,
+ 1, 2, 2, 3, 9, 9, 8, 14, 1, 1,
+ 6, 5, 2, 6, 7, 3, 5, 0, 0, 3,
+ 2, 1, 5, 5, 6, 6, 4, 6, 4, 4,
+ 6, 6, 2, 8, 1, 1, 0, 3, 6, 3,
+ 6, 2, 4, 6, 4
};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/share/bison.simple"
-/* This file comes from bison-1.28. */
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned short int yydefact[] =
+{
+ 67, 58, 64, 59, 65, 183, 180, 178, 0, 0,
+ 0, 0, 0, 0, 76, 0, 67, 176, 78, 81,
+ 0, 0, 192, 0, 0, 62, 0, 66, 68, 70,
+ 69, 71, 73, 72, 74, 75, 77, 76, 76, 0,
+ 1, 177, 79, 80, 76, 181, 82, 83, 84, 85,
+ 76, 239, 179, 239, 0, 0, 200, 193, 194, 182,
+ 228, 229, 185, 114, 115, 116, 117, 118, 0, 0,
+ 0, 0, 230, 231, 119, 184, 121, 0, 0, 172,
+ 173, 0, 86, 86, 240, 236, 63, 211, 212, 213,
+ 235, 195, 196, 199, 0, 139, 122, 0, 0, 0,
+ 0, 128, 140, 0, 120, 139, 0, 0, 114, 115,
+ 116, 0, 0, 0, 186, 0, 87, 88, 89, 90,
+ 91, 0, 214, 0, 276, 238, 0, 197, 138, 97,
+ 134, 136, 0, 0, 0, 0, 0, 0, 127, 0,
+ 188, 190, 157, 158, 155, 156, 159, 154, 150, 151,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 14,
+ 15, 16, 11, 12, 13, 0, 0, 0, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 153, 152, 110, 92, 133, 132, 0, 208, 209,
+ 210, 275, 261, 0, 0, 0, 0, 86, 248, 249,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 237, 86, 252, 0, 274,
+ 198, 131, 0, 101, 0, 0, 130, 0, 141, 101,
+ 110, 110, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 0, 53, 54, 49, 50, 51, 52, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 0,
+ 0, 0, 0, 0, 0, 143, 171, 0, 0, 0,
+ 147, 0, 144, 0, 0, 0, 0, 187, 0, 260,
+ 242, 0, 241, 0, 0, 55, 0, 0, 0, 0,
+ 105, 105, 281, 0, 0, 272, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 93, 94, 95,
+ 96, 98, 137, 135, 124, 125, 126, 129, 123, 189,
+ 191, 0, 0, 258, 0, 0, 0, 0, 0, 142,
+ 128, 140, 0, 145, 146, 0, 0, 0, 0, 0,
+ 112, 110, 206, 217, 218, 219, 224, 220, 221, 222,
+ 223, 215, 0, 226, 233, 232, 234, 0, 243, 0,
+ 0, 0, 0, 0, 277, 0, 279, 258, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 99, 100, 102, 0, 0, 0, 0, 0, 0,
+ 0, 170, 149, 0, 0, 0, 0, 107, 113, 111,
+ 205, 97, 203, 0, 216, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 284, 0, 0, 0, 268,
+ 269, 0, 0, 0, 0, 266, 0, 282, 0, 0,
+ 0, 0, 161, 0, 0, 0, 0, 148, 0, 0,
+ 0, 61, 0, 101, 0, 225, 0, 0, 257, 0,
+ 0, 105, 106, 105, 0, 0, 0, 0, 0, 262,
+ 263, 257, 0, 0, 0, 259, 0, 167, 0, 0,
+ 163, 164, 160, 60, 202, 204, 97, 108, 0, 0,
+ 0, 0, 0, 264, 265, 0, 278, 280, 0, 0,
+ 267, 270, 271, 0, 283, 165, 166, 0, 0, 0,
+ 61, 109, 103, 227, 0, 0, 97, 0, 101, 253,
+ 0, 101, 162, 168, 169, 201, 0, 207, 0, 246,
+ 0, 0, 255, 0, 0, 254, 273, 104, 244, 0,
+ 245, 0, 97, 0, 0, 0, 256, 0, 0, 0,
+ 0, 251, 0, 0, 250, 0, 247
+};
- 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.
+/* YYDEFGOTO[NTERM-NUM]. */
+static const short int yydefgoto[] =
+{
+ -1, 188, 189, 190, 252, 269, 111, 112, 72, 484,
+ 12, 73, 14, 37, 38, 39, 44, 50, 121, 321,
+ 231, 393, 324, 527, 374, 350, 512, 287, 351, 74,
+ 113, 130, 197, 131, 132, 103, 276, 363, 277, 81,
+ 15, 16, 17, 19, 18, 193, 240, 241, 59, 22,
+ 57, 94, 412, 413, 122, 200, 51, 89, 52, 45,
+ 415, 364, 76, 366, 292, 53, 85, 86, 225, 531,
+ 125, 305, 492, 396, 226, 227, 228, 229
+};
- 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.
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -399
+static const short int yypact[] =
+{
+ 406, -399, -399, -399, -399, -399, -399, -399, -26, -114,
+ -16, -53, 92, -11, 54, 136, 526, -399, 247, 173,
+ 43, 49, -399, 62, 194, -399, 814, -399, -399, -399,
+ -399, -399, -399, -399, -399, -399, -399, 134, 134, 99,
+ -399, -399, -399, -399, 134, -399, -399, -399, -399, -399,
+ 134, 212, -399, -1, 219, 225, 253, -399, -399, -399,
+ -399, -399, 135, -399, -399, -399, -399, -399, 271, 275,
+ 3, 33, -399, -399, -399, 160, -399, 99, 99, -399,
+ -399, 1029, 287, 287, -399, -399, 220, -399, -399, -399,
+ -399, -399, -399, -399, 20, 1071, -399, 141, 148, 105,
+ 135, -399, 160, -75, -399, 1071, 1029, 1174, 32, 286,
+ 293, 151, 294, 590, -399, 298, -399, -399, -399, -399,
+ -399, 1190, -399, -13, 1313, -399, 289, -399, -399, 160,
+ -399, 170, 167, 1174, 1174, 165, -68, 1174, -399, 174,
+ -399, 160, -399, -399, -399, -399, -399, -399, -399, -399,
+ -399, -399, -399, -399, -399, -399, -399, -399, -399, -399,
+ -399, -399, -399, -399, -399, 495, 591, 176, -399, -399,
+ -399, -399, -399, -399, -399, -399, -399, -399, -399, -399,
+ 177, 178, 182, 183, 776, 1212, 123, 305, 187, 188,
+ 189, -399, -399, 193, -399, 135, 160, 266, -399, -399,
+ -399, -399, -399, 284, 1229, 283, 325, 287, -399, -399,
+ 495, 591, 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1174,
+ 1174, 1174, 1174, 1174, 1174, -399, 287, -399, 144, -399,
+ -399, -4, 1110, -399, -63, -110, -399, 204, 160, -399,
+ 193, 193, -399, -399, -399, -399, -399, -399, -399, -399,
+ -399, -399, 211, -399, -399, -399, -399, -399, -399, -399,
+ -399, -399, -399, -399, -399, -399, -399, -399, -399, 214,
+ 1029, 1029, 1029, 1029, 1029, -399, -399, 79, 494, -111,
+ -399, -66, -399, 1029, 1029, 1029, 39, -399, 216, -399,
+ 135, 733, -399, 858, 858, -399, 858, 1190, 1174, 1174,
+ 50, 111, -399, 733, 97, 215, 230, 231, 232, 233,
+ 234, 733, 733, 322, 1190, 1174, 1174, -399, -399, -399,
+ -399, -399, -399, -399, -27, -399, -399, -399, -27, -399,
+ -399, 1029, 1029, -399, 235, 236, 239, 240, 1029, -399,
+ 237, 590, 26, -399, -399, 241, 242, 345, 360, 374,
+ -399, 193, 1126, -399, -399, -399, -399, -399, -399, -399,
+ -399, 328, 1029, -399, -399, -399, -399, 249, -399, 252,
+ 858, 733, 733, 11, -399, 18, -399, -399, 858, 250,
+ 1174, 1174, 1174, 1174, 1174, 256, 257, 1174, 858, 733,
+ 259, -399, -399, -399, 262, 264, -34, 1029, 1029, 1029,
+ 1029, -399, -399, 258, 1029, 1029, 1174, -399, -399, -399,
+ -399, 160, 265, 267, -399, 384, -61, 390, 393, 272,
+ 281, 282, 858, 413, 858, 295, 296, 858, 297, 160,
+ -399, 301, 302, 858, 858, 160, 300, -399, 1174, 1029,
+ 1029, 1174, -399, 304, 285, 306, 307, -399, 308, 310,
+ 118, 38, 1145, -399, 311, -399, 858, 858, 1174, 858,
+ 858, 315, -399, 315, 858, 316, 1174, 1174, 1174, -399,
+ -399, 1174, 733, 317, 319, -399, 1029, -399, 1029, 1029,
+ -399, -399, -399, -399, -399, -399, 160, 149, 421, 326,
+ 314, 733, 19, -399, -399, 412, -399, -399, 321, 858,
+ -399, -399, -399, 36, -399, -399, -399, 327, 329, 330,
+ 38, -399, 416, -399, 451, 2, -399, 1174, -399, -399,
+ 333, -399, -399, -399, -399, -399, 461, -399, 858, -399,
+ 982, 5, -4, 733, 210, -399, -27, -399, -399, 335,
+ -399, 982, -399, 457, 464, 344, -4, 858, 858, 468,
+ 417, -399, 858, 471, -399, 858, -399
+};
- 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+/* YYPGOTO[NTERM-NUM]. */
+static const short int yypgoto[] =
+{
+ -399, 361, 362, 363, 274, 279, -198, -399, 0, -19,
+ 407, 9, -399, -399, -399, 113, -399, -399, -177, -307,
+ -398, -399, -236, -399, -299, 7, -399, -212, -399, -399,
+ -25, 263, -210, -399, 391, 398, -69, -109, -180, 179,
+ -399, -399, 482, -399, -399, -399, -399, -399, -399, -399,
+ -399, -399, -399, -399, 418, -399, -399, -399, -399, -399,
+ -399, -369, -73, 100, -158, -399, 454, -399, -399, -399,
+ -399, -399, 42, 137, -399, -399, -399, -399
+};
-/* 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. */
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -176
+static const short int yytable[] =
+{
+ 11, 75, 376, 328, 191, 279, 281, 98, 296, 13,
+ 198, 295, 114, 451, 295, 84, 11, 392, 23, 20,
+ 422, 392, 338, 87, 104, 13, 105, 424, 329, 330,
+ 297, 343, 326, 21, 24, -55, -55, 140, 60, 61,
+ 192, 100, 63, 64, 65, 66, 102, 1, 2, 314,
+ 3, 4, 1, 142, 143, 3, 302, 423, 137, 306,
+ 307, 308, 309, 310, 423, 137, 313, 338, 348, 138,
+ 129, 104, 338, 105, 102, 67, 237, 325, 344, 25,
+ 129, 455, 141, 317, 318, 349, 11, 370, 510, 28,
+ 29, 30, 31, 32, 33, 34, 196, 35, 342, 441,
+ 391, 319, 320, 442, 388, 26, 317, 318, 234, 235,
+ 60, 61, 238, 100, 63, 64, 65, 66, 532, 1,
+ 2, 27, 3, 4, 319, 320, 79, 80, 60, 61,
+ 199, 100, 108, 109, 110, 66, 40, 1, 2, 409,
+ 3, 4, 529, 88, 546, 540, 99, 67, 317, 318,
+ 77, 78, 517, 126, 144, 145, 518, 82, 390, 338,
+ 127, 539, 496, 83, 497, 67, 319, 320, 68, 517,
+ 403, 69, 545, 521, 70, 54, 71, 101, 348, 291,
+ 392, 55, 416, 373, 104, 36, 105, 300, 301, 291,
+ 303, 304, 291, 291, 291, 291, 291, 311, 312, 291,
+ 56, 333, 334, 335, 336, 337, 288, 129, 46, 47,
+ 48, 58, 338, 49, 345, 346, 347, 487, 365, 339,
+ 365, 365, 428, 365, 430, 431, 432, 392, 84, 392,
+ 365, 104, 191, 105, 1, 378, 91, 3, 365, 365,
+ 68, 543, 92, 69, 375, 104, 70, 105, 71, 135,
+ 315, 316, 104, 341, 105, 482, 106, 107, 68, 317,
+ 318, 69, 394, 395, 70, 36, 71, 280, 192, 401,
+ 93, 95, 196, 371, 372, 96, 391, 319, 320, 97,
+ 133, 2, 534, 475, 4, 536, 42, 134, 43, 196,
+ 389, 291, 293, -56, 104, 294, 105, 365, 365, 365,
+ -57, 146, 194, 232, 233, 365, 230, 236, 500, 501,
+ 502, 239, 270, 271, 272, 365, 365, 530, 273, 274,
+ 317, 318, 282, 283, 284, 285, 286, 411, 443, 444,
+ 445, 446, 289, 541, 295, 448, 449, 391, 319, 320,
+ 115, 116, 117, 118, 119, 120, 327, 331, 379, 365,
+ 332, 365, 352, 387, 365, 291, 429, 291, 291, 291,
+ 365, 365, 435, 380, 381, 382, 383, 384, 397, 398,
+ 473, 474, 399, 400, 404, 405, 406, 407, 408, 402,
+ 414, 450, 417, 365, 365, 418, 365, 365, 427, 433,
+ 434, 365, 438, 367, 368, 439, 369, 440, 452, 365,
+ 447, 454, 456, 377, 453, 457, -175, 507, 458, 508,
+ 509, 385, 386, 472, 459, 460, 291, 462, 365, -63,
+ 1, 2, 477, 3, 4, 5, 365, 486, 441, 464,
+ 466, 6, 7, 491, 467, 468, 471, 476, 513, 478,
+ 479, 291, 291, 291, 488, 480, 491, 481, 495, 499,
+ 8, 483, 515, 9, 505, 365, 506, 10, 423, 514,
+ 365, 519, 526, 528, 522, 537, 523, 524, 544, 547,
+ 419, 420, 421, 535, 365, 365, 548, 549, 426, 365,
+ 552, 553, 365, 555, 298, 222, 223, 224, 436, 437,
+ 299, 525, 533, 124, 511, 323, 139, 136, 41, 60,
+ 61, 123, 100, 108, 109, 110, 66, 90, 1, 2,
+ 483, 3, 4, 503, 425, 0, 0, 0, 0, 0,
+ 0, 0, 461, 0, 463, 0, -174, 465, 0, 0,
+ 0, 0, 0, 469, 470, 0, 67, 0, 0, -63,
+ 1, 2, 0, 3, 4, 5, 0, 0, 0, 0,
+ 0, 6, 7, 0, 0, 0, 489, 490, 0, 493,
+ 494, 0, 0, 0, 498, 0, 0, 0, 0, 0,
+ 8, 0, 504, 9, 0, 0, 0, 10, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 0, 0,
+ 0, 516, 0, 0, 0, 60, 61, 0, 0, 520,
+ 0, 0, 0, 0, 1, 2, 0, 3, 4, 0,
+ 147, 0, 253, 254, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 148, 149, 0, 0, 0, 538, 68,
+ 0, 0, 69, 542, 0, 70, 0, 71, 340, 0,
+ 0, 0, 0, 0, 0, 0, 0, 550, 551, 0,
+ 0, 0, 554, 0, 0, 556, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 0, 0, 0, 0, 0, 0, 0,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 0, 0, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 0, 180, 0, 181, 182, 183, 0, 0, 0,
+ 0, 0, 0, 0, 104, 0, 105, 0, 184, 0,
+ 0, 185, 0, 186, 0, 187, 353, 354, 60, 61,
+ 355, 0, 0, 0, 0, 0, 0, 1, 2, 0,
+ 3, 4, 0, 356, 357, 358, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 359, 360, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 60, 61, 361, 100, 108, 109, 110, 66, 0,
+ 1, 2, 0, 3, 4, 0, 0, 0, 0, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 0, 0, 67, 60,
+ 61, 0, 62, 63, 64, 65, 66, 0, 1, 2,
+ 0, 3, 4, 0, 0, 0, 0, 0, 0, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 0, 180, 67, 181, 182, 183,
+ 0, 353, 354, 60, 61, 355, 0, 104, 0, 105,
+ 0, 0, 1, 2, 362, 3, 4, 0, 356, 357,
+ 358, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 359, 360, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 361, 0,
+ 0, 68, 0, 0, 69, 0, 275, 70, 0, 71,
+ 0, 0, 0, 0, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 0, 0, 0, 0, 0, 0, 0, 0, 68,
+ 0, 0, 69, 0, 0, 70, 0, 71, 0, 0,
+ 0, 0, 0, 0, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 0,
+ 180, 0, 181, 182, 183, 353, 354, 0, 0, 355,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 362,
+ 0, 0, 356, 357, 358, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 359, 360, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 361, 0, 60, 61, 0, 100, 108, 109,
+ 110, 66, 0, 1, 2, 0, 3, 4, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 0, 0, 0, 0, 0,
+ 0, 67, 0, 0, 0, 0, 60, 61, 0, 100,
+ 63, 64, 65, 66, 0, 1, 2, 0, 3, 4,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 128, 180, 0, 181, 182, 183, 0,
+ 0, 0, 0, 67, 0, 60, 61, 0, 100, 63,
+ 64, 65, 66, 362, 1, 2, 0, 3, 4, 0,
+ 0, 60, 61, 0, 100, 63, 64, 65, 66, 0,
+ 1, 2, 322, 3, 4, 0, 0, 0, 0, 0,
+ 60, 61, 67, 100, 63, 64, 65, 66, 410, 1,
+ 2, 0, 3, 4, 68, 0, 0, 69, 67, 0,
+ 70, 0, 71, 0, 0, 0, 0, 485, 0, 60,
+ 61, 0, 100, 63, 64, 65, 66, 67, 1, 2,
+ 0, 3, 4, 0, 0, 60, 61, 0, 195, 63,
+ 64, 65, 66, 0, 1, 2, 68, 3, 4, 69,
+ 0, 0, 70, 0, 71, 0, 67, 60, 61, 0,
+ 100, 108, 109, 110, 66, 0, 1, 2, 0, 3,
+ 4, 0, 67, 0, 60, 61, 0, 290, 63, 64,
+ 65, 66, 0, 1, 2, 68, 3, 4, 69, 0,
+ 0, 70, 0, 71, 67, 0, 0, 0, 0, 0,
+ 0, 68, 0, 0, 69, 0, 0, 70, 0, 71,
+ 0, 67, 0, 0, 0, 0, 0, 0, 0, 0,
+ 68, 0, 0, 69, 0, 0, 70, 0, 71, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,
+ 0, 0, 69, 0, 0, 70, 0, 71, 0, 0,
+ 0, 0, 0, 0, 0, 68, 0, 0, 69, 0,
+ 0, 70, 0, 71, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 201, 0, 0, 0, 68, 0, 0,
+ 69, 0, 0, 70, 0, 278, 0, 0, 0, 0,
+ 0, 202, 203, 0, 68, 0, 0, 69, 0, 0,
+ 70, 0, 71, 204, 205, 206, 207, 208, 209, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 210, 211, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 212, 213, 214, 0,
+ 0, 215, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 216, 217, 218, 219, 220, 221
+};
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C. */
-/* This used to test MSDOS, but that is a bad idea
- since that symbol is in the user namespace. */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for malloc.h, which pollutes the namespace;
- instead, just don't use alloca. */
-#include <malloc.h>
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
- So I turned it off. rms, 2 May 1997. */
-/* #include <malloc.h> */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
- and on HPUX 10. Eventually we can turn this on. */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
-
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC malloc
-#endif
+static const short int yycheck[] =
+{
+ 0, 26, 301, 239, 113, 185, 186, 4, 206, 0,
+ 23, 9, 81, 411, 9, 16, 16, 324, 132, 45,
+ 9, 328, 133, 24, 134, 16, 136, 9, 240, 241,
+ 207, 142, 142, 59, 50, 3, 4, 106, 5, 6,
+ 113, 8, 9, 10, 11, 12, 71, 14, 15, 226,
+ 17, 18, 14, 21, 22, 17, 214, 46, 133, 217,
+ 218, 219, 220, 221, 46, 133, 224, 133, 29, 144,
+ 95, 134, 133, 136, 99, 42, 144, 140, 144, 132,
+ 105, 142, 107, 110, 111, 46, 86, 297, 486, 35,
+ 36, 37, 38, 39, 40, 41, 121, 43, 278, 133,
+ 127, 128, 129, 137, 314, 13, 110, 111, 133, 134,
+ 5, 6, 137, 8, 9, 10, 11, 12, 516, 14,
+ 15, 132, 17, 18, 128, 129, 27, 28, 5, 6,
+ 143, 8, 9, 10, 11, 12, 0, 14, 15, 351,
+ 17, 18, 140, 144, 542, 140, 143, 42, 110, 111,
+ 37, 38, 133, 133, 3, 4, 137, 44, 316, 133,
+ 140, 530, 461, 50, 463, 42, 128, 129, 135, 133,
+ 144, 138, 541, 137, 141, 132, 143, 144, 29, 204,
+ 487, 132, 362, 133, 134, 131, 136, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 138, 270, 271, 272, 273, 274, 197, 232, 35, 36,
+ 37, 17, 133, 40, 283, 284, 285, 453, 291, 140,
+ 293, 294, 380, 296, 382, 383, 384, 534, 16, 536,
+ 303, 134, 341, 136, 14, 138, 17, 17, 311, 312,
+ 135, 31, 17, 138, 133, 134, 141, 136, 143, 144,
+ 106, 107, 134, 278, 136, 137, 77, 78, 135, 110,
+ 111, 138, 331, 332, 141, 131, 143, 144, 341, 338,
+ 17, 136, 297, 298, 299, 4, 127, 128, 129, 4,
+ 139, 15, 518, 441, 18, 521, 39, 139, 41, 314,
+ 315, 316, 9, 7, 134, 12, 136, 370, 371, 372,
+ 7, 7, 4, 133, 137, 378, 17, 142, 466, 467,
+ 468, 137, 136, 136, 136, 388, 389, 515, 136, 136,
+ 110, 111, 17, 136, 136, 136, 133, 352, 397, 398,
+ 399, 400, 48, 531, 9, 404, 405, 127, 128, 129,
+ 53, 54, 55, 56, 57, 58, 142, 136, 133, 422,
+ 136, 424, 136, 31, 427, 380, 381, 382, 383, 384,
+ 433, 434, 387, 133, 133, 133, 133, 133, 133, 133,
+ 439, 440, 133, 133, 133, 133, 31, 17, 4, 142,
+ 52, 406, 133, 456, 457, 133, 459, 460, 138, 133,
+ 133, 464, 133, 293, 294, 133, 296, 133, 133, 472,
+ 142, 17, 12, 303, 137, 12, 0, 476, 136, 478,
+ 479, 311, 312, 438, 133, 133, 441, 4, 491, 13,
+ 14, 15, 137, 17, 18, 19, 499, 452, 133, 133,
+ 133, 25, 26, 458, 133, 133, 136, 133, 17, 133,
+ 133, 466, 467, 468, 133, 137, 471, 137, 133, 133,
+ 44, 451, 138, 47, 137, 528, 137, 51, 46, 133,
+ 533, 140, 46, 12, 137, 4, 137, 137, 133, 12,
+ 370, 371, 372, 140, 547, 548, 12, 133, 378, 552,
+ 12, 64, 555, 12, 210, 124, 124, 124, 388, 389,
+ 211, 510, 517, 86, 487, 232, 105, 99, 16, 5,
+ 6, 83, 8, 9, 10, 11, 12, 53, 14, 15,
+ 510, 17, 18, 471, 377, -1, -1, -1, -1, -1,
+ -1, -1, 422, -1, 424, -1, 0, 427, -1, -1,
+ -1, -1, -1, 433, 434, -1, 42, -1, -1, 13,
+ 14, 15, -1, 17, 18, 19, -1, -1, -1, -1,
+ -1, 25, 26, -1, -1, -1, 456, 457, -1, 459,
+ 460, -1, -1, -1, 464, -1, -1, -1, -1, -1,
+ 44, -1, 472, 47, -1, -1, -1, 51, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, -1, -1,
+ -1, 491, -1, -1, -1, 5, 6, -1, -1, 499,
+ -1, -1, -1, -1, 14, 15, -1, 17, 18, -1,
+ 20, -1, 21, 22, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 33, 34, -1, -1, -1, 528, 135,
+ -1, -1, 138, 533, -1, 141, -1, 143, 144, -1,
+ -1, -1, -1, -1, -1, -1, -1, 547, 548, -1,
+ -1, -1, 552, -1, -1, 555, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, -1, -1, -1, -1, -1, -1, -1,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, -1, -1, -1, -1, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, -1, 122, -1, 124, 125, 126, -1, -1, -1,
+ -1, -1, -1, -1, 134, -1, 136, -1, 138, -1,
+ -1, 141, -1, 143, -1, 145, 3, 4, 5, 6,
+ 7, -1, -1, -1, -1, -1, -1, 14, 15, -1,
+ 17, 18, -1, 20, 21, 22, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 33, 34, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5, 6, 50, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, 17, 18, -1, -1, -1, -1, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, -1, -1, 42, 5,
+ 6, -1, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, 17, 18, -1, -1, -1, -1, -1, -1, -1,
+ -1, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, -1, 122, 42, 124, 125, 126,
+ -1, 3, 4, 5, 6, 7, -1, 134, -1, 136,
+ -1, -1, 14, 15, 141, 17, 18, -1, 20, 21,
+ 22, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 33, 34, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 50, -1,
+ -1, 135, -1, -1, 138, -1, 140, 141, -1, 143,
+ -1, -1, -1, -1, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, 138, -1, -1, 141, -1, 143, -1, -1,
+ -1, -1, -1, -1, -1, -1, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, -1,
+ 122, -1, 124, 125, 126, 3, 4, -1, -1, 7,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 141,
+ -1, -1, 20, 21, 22, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 33, 34, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 50, -1, 5, 6, -1, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, 17, 18, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, -1, -1, -1, -1, -1,
+ -1, 42, -1, -1, -1, -1, 5, 6, -1, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, 17, 18,
+ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 32, 122, -1, 124, 125, 126, -1,
+ -1, -1, -1, 42, -1, 5, 6, -1, 8, 9,
+ 10, 11, 12, 141, 14, 15, -1, 17, 18, -1,
+ -1, 5, 6, -1, 8, 9, 10, 11, 12, -1,
+ 14, 15, 32, 17, 18, -1, -1, -1, -1, -1,
+ 5, 6, 42, 8, 9, 10, 11, 12, 32, 14,
+ 15, -1, 17, 18, 135, -1, -1, 138, 42, -1,
+ 141, -1, 143, -1, -1, -1, -1, 32, -1, 5,
+ 6, -1, 8, 9, 10, 11, 12, 42, 14, 15,
+ -1, 17, 18, -1, -1, 5, 6, -1, 8, 9,
+ 10, 11, 12, -1, 14, 15, 135, 17, 18, 138,
+ -1, -1, 141, -1, 143, -1, 42, 5, 6, -1,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, 17,
+ 18, -1, 42, -1, 5, 6, -1, 8, 9, 10,
+ 11, 12, -1, 14, 15, 135, 17, 18, 138, -1,
+ -1, 141, -1, 143, 42, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, 138, -1, -1, 141, -1, 143,
+ -1, 42, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, 138, -1, -1, 141, -1, 143, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, 138, -1, -1, 141, -1, 143, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, 138, -1,
+ -1, 141, -1, 143, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 30, -1, -1, -1, 135, -1, -1,
+ 138, -1, -1, 141, -1, 143, -1, -1, -1, -1,
+ -1, 48, 49, -1, 135, -1, -1, 138, -1, -1,
+ 141, -1, 143, 60, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 80, 81, 82, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 103, 104, 105, -1,
+ -1, 108, 109, 110, 111, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126
+};
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 14, 15, 17, 18, 19, 25, 26, 44, 47,
+ 51, 154, 156, 157, 158, 186, 187, 188, 190, 189,
+ 45, 59, 195, 132, 50, 132, 13, 132, 35, 36,
+ 37, 38, 39, 40, 41, 43, 131, 159, 160, 161,
+ 0, 188, 39, 41, 162, 205, 35, 36, 37, 40,
+ 163, 202, 204, 211, 132, 132, 138, 196, 17, 194,
+ 5, 6, 8, 9, 10, 11, 12, 42, 135, 138,
+ 141, 143, 154, 157, 175, 176, 208, 161, 161, 27,
+ 28, 185, 161, 161, 16, 212, 213, 24, 144, 203,
+ 212, 17, 17, 17, 197, 136, 4, 4, 4, 143,
+ 8, 144, 176, 181, 134, 136, 185, 185, 9, 10,
+ 11, 152, 153, 176, 182, 53, 54, 55, 56, 57,
+ 58, 164, 200, 200, 156, 216, 133, 140, 32, 176,
+ 177, 179, 180, 139, 139, 144, 181, 133, 144, 180,
+ 182, 176, 21, 22, 3, 4, 7, 20, 33, 34,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 80, 81, 82, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 122, 124, 125, 126, 138, 141, 143, 145, 147, 148,
+ 149, 183, 208, 191, 4, 8, 176, 178, 23, 143,
+ 201, 30, 48, 49, 60, 61, 62, 63, 64, 65,
+ 81, 82, 103, 104, 105, 108, 121, 122, 123, 124,
+ 125, 126, 147, 148, 149, 214, 220, 221, 222, 223,
+ 17, 166, 133, 137, 176, 176, 142, 144, 176, 137,
+ 192, 193, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 150, 21, 22, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 151,
+ 136, 136, 136, 136, 136, 140, 182, 184, 143, 184,
+ 144, 184, 17, 136, 136, 136, 133, 173, 157, 48,
+ 8, 176, 210, 9, 12, 9, 152, 164, 150, 151,
+ 176, 176, 210, 176, 176, 217, 210, 210, 210, 210,
+ 210, 176, 176, 210, 164, 106, 107, 110, 111, 128,
+ 129, 165, 32, 177, 168, 140, 142, 142, 168, 173,
+ 173, 136, 136, 182, 182, 182, 182, 182, 133, 140,
+ 144, 176, 184, 142, 144, 182, 182, 182, 29, 46,
+ 171, 174, 136, 3, 4, 7, 20, 21, 22, 33,
+ 34, 50, 141, 183, 207, 208, 209, 209, 209, 209,
+ 178, 176, 176, 133, 170, 133, 170, 209, 138, 133,
+ 133, 133, 133, 133, 133, 209, 209, 31, 178, 176,
+ 210, 127, 165, 167, 182, 182, 219, 133, 133, 133,
+ 133, 182, 142, 144, 133, 133, 31, 17, 4, 173,
+ 32, 176, 198, 199, 52, 206, 184, 133, 133, 209,
+ 209, 209, 9, 46, 9, 219, 209, 138, 210, 176,
+ 210, 210, 210, 133, 133, 176, 209, 209, 133, 133,
+ 133, 133, 137, 182, 182, 182, 182, 142, 182, 182,
+ 176, 166, 133, 137, 17, 142, 12, 12, 136, 133,
+ 133, 209, 4, 209, 133, 209, 133, 133, 133, 209,
+ 209, 136, 176, 182, 182, 210, 133, 137, 133, 133,
+ 137, 137, 137, 154, 155, 32, 176, 168, 133, 209,
+ 209, 176, 218, 209, 209, 133, 170, 170, 209, 133,
+ 210, 210, 210, 218, 209, 137, 137, 182, 182, 182,
+ 166, 171, 172, 17, 133, 138, 209, 133, 137, 140,
+ 209, 137, 137, 137, 137, 155, 46, 169, 12, 140,
+ 152, 215, 166, 176, 168, 140, 168, 4, 209, 207,
+ 140, 152, 209, 31, 133, 207, 166, 12, 12, 133,
+ 209, 209, 12, 64, 209, 12, 209
+};
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
+#define YYEMPTY (-2)
#define YYEOF 0
+
#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
+
#define YYFAIL goto yyerrlab
+
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
+
+#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
while (0)
+
#define YYTERROR 1
#define YYERRCODE 256
-#ifndef YYPURE
-#define YYLEX yylex()
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
#endif
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
-#else /* not YYLSP_NEEDED */
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
+# define YYLEX yylex (YYLEX_PARAM)
#else
-#define YYLEX yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
+# define YYLEX yylex ()
#endif
-/* If nonreentrant, generate the variables here */
+/* Enable debugging if requested. */
+#if YYDEBUG
-#ifndef YYPURE
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short int *bottom, short int *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short int *bottom;
+ short int *top;
#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
#endif
+{
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
+# define YYINITDEPTH 200
#endif
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
+# define YYMAXDEPTH 10000
#endif
+
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
{
- register char *f = from;
- register char *t = to;
- register int i = count;
+ const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
- while (i-- > 0)
- *t++ = *f++;
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
}
+# endif
+
+#endif /* YYERROR_VERBOSE */
+
+
-#else /* __cplusplus */
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
+#if defined (__STDC__) || defined (__cplusplus)
static void
-__yy_memcpy (char *to, char *from, unsigned int count)
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
{
- register char *t = to;
- register char *f = from;
- register int i = count;
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
- while (i-- > 0)
- *t++ = *f++;
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
}
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
#endif
-#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
-#line 217 "/usr/share/bison.simple"
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
+/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
+#else
+int yyparse ();
#endif
-#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol. */
+int yychar;
+
+/* The semantic value of the look-ahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
+yyparse ()
+
+#endif
+#endif
{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ int yystate;
+ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ short int *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
#define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
- int yystacksize = YYINITDEPTH;
- int yyfree_stacks = 0;
+ YYSIZE_T yystacksize = YYINITDEPTH;
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
-#endif
-#endif
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
int yylen;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
+ YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
@@ -2140,644 +2807,675 @@ yyparse(YYPARSE_PARAM_ARG)
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
- yyssp = yyss - 1;
+ yyssp = yyss;
yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
+ goto yysetstate;
- *++yyssp = yystate;
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to reallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
+ yysetstate:
+ *yyssp = yystate;
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
/* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
+ YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
-
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short int *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
/* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 2;
- }
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
+ if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
- yyfree_stacks = 1;
-#endif
- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
- size * (unsigned int) sizeof (*yyssp));
- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
- size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
- size * (unsigned int) sizeof (*yylsp));
-#endif
+
+ {
+ short int *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
#endif /* no yyoverflow */
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
- if (yyssp >= yyss + yystacksize - 1)
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
- yybackup:
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
+/* Read a look-ahead token if we need one and don't already have one. */
/* yyresume: */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
- if (yyn == YYFLAG)
+ if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
+ /* Not known => get a look-ahead token if don't already have one. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
+ YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
+ if (yychar <= YYEOF)
{
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
goto yydefault;
-
yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
+ if (yyn <= 0)
{
- if (yyn == YYFLAG)
+ if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- else if (yyn == 0)
- goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
yystate = yyn;
goto yynewstate;
-/* Do the default action for the current state. */
-yydefault:
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
+ goto yyreduce;
-/* Do a reduction. yyn is the number of a rule to reduce with. */
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
yyreduce:
+ /* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-#if YYDEBUG != 0
- if (yydebug)
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
{
- int i;
+ case 29:
+#line 1054 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;}
+ break;
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
+ case 30:
+#line 1054 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;}
+ break;
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
+ case 31:
+#line 1055 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;}
+ break;
+ case 32:
+#line 1055 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;}
+ break;
- switch (yyn) {
-
-case 28:
-#line 1054 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_EQ; ;
- break;}
-case 29:
-#line 1054 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_NE; ;
- break;}
-case 30:
-#line 1055 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_SLT; ;
- break;}
-case 31:
-#line 1055 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_SGT; ;
- break;}
-case 32:
-#line 1056 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_SLE; ;
- break;}
-case 33:
-#line 1056 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_SGE; ;
- break;}
-case 34:
-#line 1057 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_ULT; ;
- break;}
-case 35:
-#line 1057 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_UGT; ;
- break;}
-case 36:
-#line 1058 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_ULE; ;
- break;}
-case 37:
-#line 1058 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.IPredicate = ICmpInst::ICMP_UGE; ;
- break;}
-case 38:
-#line 1062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_OEQ; ;
- break;}
-case 39:
-#line 1062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_ONE; ;
- break;}
-case 40:
-#line 1063 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_OLT; ;
- break;}
-case 41:
-#line 1063 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_OGT; ;
- break;}
-case 42:
-#line 1064 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_OLE; ;
- break;}
-case 43:
-#line 1064 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_OGE; ;
- break;}
-case 44:
-#line 1065 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_ORD; ;
- break;}
-case 45:
-#line 1065 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_UNO; ;
- break;}
-case 46:
-#line 1066 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_UEQ; ;
- break;}
-case 47:
-#line 1066 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_UNE; ;
- break;}
-case 48:
-#line 1067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_ULT; ;
- break;}
-case 49:
-#line 1067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_UGT; ;
- break;}
-case 50:
-#line 1068 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_ULE; ;
- break;}
-case 51:
-#line 1068 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_UGE; ;
- break;}
-case 52:
-#line 1069 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_TRUE; ;
- break;}
-case 53:
-#line 1070 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.FPredicate = FCmpInst::FCMP_FALSE; ;
- break;}
-case 60:
-#line 1079 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.StrVal = 0; ;
- break;}
-case 61:
-#line 1083 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.StrVal = yyvsp[-1].StrVal;
+ case 33:
+#line 1056 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;}
+ break;
+
+ case 34:
+#line 1056 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;}
+ break;
+
+ case 35:
+#line 1057 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;}
+ break;
+
+ case 36:
+#line 1057 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;}
+ break;
+
+ case 37:
+#line 1058 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;}
+ break;
+
+ case 38:
+#line 1058 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;}
+ break;
+
+ case 39:
+#line 1062 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;}
+ break;
+
+ case 40:
+#line 1062 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;}
+ break;
+
+ case 41:
+#line 1063 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;}
+ break;
+
+ case 42:
+#line 1063 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;}
+ break;
+
+ case 43:
+#line 1064 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;}
+ break;
+
+ case 44:
+#line 1064 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;}
+ break;
+
+ case 45:
+#line 1065 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;}
+ break;
+
+ case 46:
+#line 1065 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;}
+ break;
+
+ case 47:
+#line 1066 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;}
+ break;
+
+ case 48:
+#line 1066 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;}
+ break;
+
+ case 49:
+#line 1067 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;}
+ break;
+
+ case 50:
+#line 1067 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;}
+ break;
+
+ case 51:
+#line 1068 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;}
+ break;
+
+ case 52:
+#line 1068 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;}
+ break;
+
+ case 53:
+#line 1069 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;}
+ break;
+
+ case 54:
+#line 1070 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;}
+ break;
+
+ case 61:
+#line 1079 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.StrVal) = 0; ;}
+ break;
+
+ case 62:
+#line 1083 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.StrVal) = (yyvsp[-1].StrVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 62:
-#line 1087 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.StrVal = 0;
+ ;}
+ break;
+
+ case 63:
+#line 1087 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.StrVal) = 0;
CHECK_FOR_ERROR
- ;
- break;}
-case 65:
-#line 1094 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.StrVal = yyvsp[-1].StrVal;
+ ;}
+ break;
+
+ case 66:
+#line 1094 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.StrVal) = (yyvsp[-1].StrVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 66:
-#line 1098 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.StrVal = 0;
- CHECK_FOR_ERROR
- ;
- break;}
-case 67:
-#line 1104 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::InternalLinkage; ;
- break;}
-case 68:
-#line 1105 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::WeakLinkage; ;
- break;}
-case 69:
-#line 1106 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ;
- break;}
-case 70:
-#line 1107 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::AppendingLinkage; ;
- break;}
-case 71:
-#line 1108 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::DLLExportLinkage; ;
- break;}
-case 72:
-#line 1112 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::DLLImportLinkage; ;
- break;}
-case 73:
-#line 1113 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
- break;}
-case 74:
-#line 1114 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
- break;}
-case 75:
-#line 1118 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Visibility = GlobalValue::DefaultVisibility; ;
- break;}
-case 76:
-#line 1119 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Visibility = GlobalValue::HiddenVisibility; ;
- break;}
-case 77:
-#line 1123 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
- break;}
-case 78:
-#line 1124 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::DLLImportLinkage; ;
- break;}
-case 79:
-#line 1125 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
- break;}
-case 80:
-#line 1129 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
- break;}
-case 81:
-#line 1130 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::InternalLinkage; ;
- break;}
-case 82:
-#line 1131 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ;
- break;}
-case 83:
-#line 1132 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::WeakLinkage; ;
- break;}
-case 84:
-#line 1133 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.Linkage = GlobalValue::DLLExportLinkage; ;
- break;}
-case 85:
-#line 1136 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.UIntVal = CallingConv::C; ;
- break;}
-case 86:
-#line 1137 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.UIntVal = CallingConv::C; ;
- break;}
-case 87:
-#line 1138 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.UIntVal = CallingConv::Fast; ;
- break;}
-case 88:
-#line 1139 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.UIntVal = CallingConv::Cold; ;
- break;}
-case 89:
-#line 1140 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.UIntVal = CallingConv::X86_StdCall; ;
- break;}
-case 90:
-#line 1141 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.UIntVal = CallingConv::X86_FastCall; ;
- break;}
-case 91:
-#line 1142 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val)
+ ;}
+ break;
+
+ case 67:
+#line 1098 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.StrVal) = 0;
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 68:
+#line 1104 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
+ break;
+
+ case 69:
+#line 1105 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
+ break;
+
+ case 70:
+#line 1106 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
+ break;
+
+ case 71:
+#line 1107 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
+ break;
+
+ case 72:
+#line 1108 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
+ break;
+
+ case 73:
+#line 1112 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
+ break;
+
+ case 74:
+#line 1113 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
+ break;
+
+ case 75:
+#line 1114 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
+ break;
+
+ case 76:
+#line 1118 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;}
+ break;
+
+ case 77:
+#line 1119 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;}
+ break;
+
+ case 78:
+#line 1123 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
+ break;
+
+ case 79:
+#line 1124 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
+ break;
+
+ case 80:
+#line 1125 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
+ break;
+
+ case 81:
+#line 1129 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
+ break;
+
+ case 82:
+#line 1130 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
+ break;
+
+ case 83:
+#line 1131 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
+ break;
+
+ case 84:
+#line 1132 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
+ break;
+
+ case 85:
+#line 1133 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
+ break;
+
+ case 86:
+#line 1136 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.UIntVal) = CallingConv::C; ;}
+ break;
+
+ case 87:
+#line 1137 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.UIntVal) = CallingConv::C; ;}
+ break;
+
+ case 88:
+#line 1138 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.UIntVal) = CallingConv::Fast; ;}
+ break;
+
+ case 89:
+#line 1139 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.UIntVal) = CallingConv::Cold; ;}
+ break;
+
+ case 90:
+#line 1140 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.UIntVal) = CallingConv::X86_StdCall; ;}
+ break;
+
+ case 91:
+#line 1141 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.UIntVal) = CallingConv::X86_FastCall; ;}
+ break;
+
+ case 92:
+#line 1142 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val))
GEN_ERROR("Calling conv too large");
- yyval.UIntVal = yyvsp[0].UInt64Val;
+ (yyval.UIntVal) = (yyvsp[0].UInt64Val);
CHECK_FOR_ERROR
- ;
- break;}
-case 92:
-#line 1149 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ParamAttrs = FunctionType::ZExtAttribute; ;
- break;}
-case 93:
-#line 1150 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ParamAttrs = FunctionType::SExtAttribute; ;
- break;}
-case 94:
-#line 1151 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ParamAttrs = FunctionType::InRegAttribute; ;
- break;}
-case 95:
-#line 1152 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ParamAttrs = FunctionType::StructRetAttribute; ;
- break;}
-case 96:
-#line 1155 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ParamAttrs = FunctionType::NoAttributeSet; ;
- break;}
-case 97:
-#line 1156 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ParamAttrs = FunctionType::ParameterAttributes(yyvsp[-1].ParamAttrs | yyvsp[0].ParamAttrs);
- ;
- break;}
-case 98:
-#line 1161 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ParamAttrs = FunctionType::NoReturnAttribute; ;
- break;}
-case 100:
-#line 1165 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ParamAttrs = FunctionType::NoAttributeSet; ;
- break;}
-case 101:
-#line 1166 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ParamAttrs = FunctionType::ParameterAttributes(yyvsp[-1].ParamAttrs | yyvsp[0].ParamAttrs);
- ;
- break;}
-case 102:
-#line 1173 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.UIntVal = 0; ;
- break;}
-case 103:
-#line 1174 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.UIntVal = yyvsp[0].UInt64Val;
- if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
+ ;}
+ break;
+
+ case 93:
+#line 1149 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ParamAttrs) = FunctionType::ZExtAttribute; ;}
+ break;
+
+ case 94:
+#line 1150 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ParamAttrs) = FunctionType::SExtAttribute; ;}
+ break;
+
+ case 95:
+#line 1151 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ParamAttrs) = FunctionType::InRegAttribute; ;}
+ break;
+
+ case 96:
+#line 1152 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ParamAttrs) = FunctionType::StructRetAttribute; ;}
+ break;
+
+ case 97:
+#line 1155 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ParamAttrs) = FunctionType::NoAttributeSet; ;}
+ break;
+
+ case 98:
+#line 1156 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ParamAttrs) = FunctionType::ParameterAttributes((yyvsp[-1].ParamAttrs) | (yyvsp[0].ParamAttrs));
+ ;}
+ break;
+
+ case 99:
+#line 1161 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ParamAttrs) = FunctionType::NoReturnAttribute; ;}
+ break;
+
+ case 101:
+#line 1165 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ParamAttrs) = FunctionType::NoAttributeSet; ;}
+ break;
+
+ case 102:
+#line 1166 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ParamAttrs) = FunctionType::ParameterAttributes((yyvsp[-1].ParamAttrs) | (yyvsp[0].ParamAttrs));
+ ;}
+ break;
+
+ case 103:
+#line 1173 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.UIntVal) = 0; ;}
+ break;
+
+ case 104:
+#line 1174 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.UIntVal) = (yyvsp[0].UInt64Val);
+ if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
GEN_ERROR("Alignment must be a power of two");
CHECK_FOR_ERROR
-;
- break;}
-case 104:
-#line 1180 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.UIntVal = 0; ;
- break;}
-case 105:
-#line 1181 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.UIntVal = yyvsp[0].UInt64Val;
- if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
+;}
+ break;
+
+ case 105:
+#line 1180 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.UIntVal) = 0; ;}
+ break;
+
+ case 106:
+#line 1181 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.UIntVal) = (yyvsp[0].UInt64Val);
+ if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
GEN_ERROR("Alignment must be a power of two");
CHECK_FOR_ERROR
-;
- break;}
-case 106:
-#line 1189 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- for (unsigned i = 0, e = strlen(yyvsp[0].StrVal); i != e; ++i)
- if (yyvsp[0].StrVal[i] == '"' || yyvsp[0].StrVal[i] == '\\')
+;}
+ break;
+
+ case 107:
+#line 1189 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i)
+ if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\')
GEN_ERROR("Invalid character in section name");
- yyval.StrVal = yyvsp[0].StrVal;
+ (yyval.StrVal) = (yyvsp[0].StrVal);
CHECK_FOR_ERROR
-;
- break;}
-case 107:
-#line 1197 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.StrVal = 0; ;
- break;}
-case 108:
-#line 1198 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.StrVal = yyvsp[0].StrVal; ;
- break;}
-case 109:
-#line 1203 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{;
- break;}
-case 110:
-#line 1204 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{;
- break;}
-case 111:
-#line 1205 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- CurGV->setSection(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
+;}
+ break;
+
+ case 108:
+#line 1197 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.StrVal) = 0; ;}
+ break;
+
+ case 109:
+#line 1198 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.StrVal) = (yyvsp[0].StrVal); ;}
+ break;
+
+ case 110:
+#line 1203 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {;}
+ break;
+
+ case 111:
+#line 1204 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {;}
+ break;
+
+ case 112:
+#line 1205 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ CurGV->setSection((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 112:
-#line 1210 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (yyvsp[0].UInt64Val != 0 && !isPowerOf2_32(yyvsp[0].UInt64Val))
+ ;}
+ break;
+
+ case 113:
+#line 1210 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val)))
GEN_ERROR("Alignment must be a power of two");
- CurGV->setAlignment(yyvsp[0].UInt64Val);
+ CurGV->setAlignment((yyvsp[0].UInt64Val));
CHECK_FOR_ERROR
- ;
- break;}
-case 117:
-#line 1226 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeVal = new PATypeHolder(OpaqueType::get());
+ ;}
+ break;
+
+ case 118:
+#line 1226 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeVal) = new PATypeHolder(OpaqueType::get());
CHECK_FOR_ERROR
- ;
- break;}
-case 118:
-#line 1230 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType);
- CHECK_FOR_ERROR
- ;
- break;}
-case 119:
-#line 1234 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Pointer type?
- if (*yyvsp[-1].TypeVal == Type::LabelTy)
+ ;}
+ break;
+
+ case 119:
+#line 1230 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 120:
+#line 1234 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Pointer type?
+ if (*(yyvsp[-1].TypeVal) == Type::LabelTy)
GEN_ERROR("Cannot form a pointer to a basic block");
- yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal)));
- delete yyvsp[-1].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 120:
-#line 1241 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Named types are also simple types...
- const Type* tmp = getTypeVal(yyvsp[0].ValIDVal);
- CHECK_FOR_ERROR
- yyval.TypeVal = new PATypeHolder(tmp);
- ;
- break;}
-case 121:
-#line 1246 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Type UpReference
- if (yyvsp[0].UInt64Val > (uint64_t)~0U) GEN_ERROR("Value out of range");
+ (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(PointerType::get(*(yyvsp[-1].TypeVal))));
+ delete (yyvsp[-1].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 121:
+#line 1241 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Named types are also simple types...
+ const Type* tmp = getTypeVal((yyvsp[0].ValIDVal));
+ CHECK_FOR_ERROR
+ (yyval.TypeVal) = new PATypeHolder(tmp);
+ ;}
+ break;
+
+ case 122:
+#line 1246 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Type UpReference
+ if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range");
OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
- UpRefs.push_back(UpRefRecord((unsigned)yyvsp[0].UInt64Val, OT)); // Add to vector...
- yyval.TypeVal = new PATypeHolder(OT);
+ UpRefs.push_back(UpRefRecord((unsigned)(yyvsp[0].UInt64Val), OT)); // Add to vector...
+ (yyval.TypeVal) = new PATypeHolder(OT);
UR_OUT("New Upreference!\n");
CHECK_FOR_ERROR
- ;
- break;}
-case 122:
-#line 1254 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 123:
+#line 1254 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
std::vector<const Type*> Params;
std::vector<FunctionType::ParameterAttributes> Attrs;
- Attrs.push_back(yyvsp[0].ParamAttrs);
- for (TypeWithAttrsList::iterator I=yyvsp[-2].TypeWithAttrsList->begin(), E=yyvsp[-2].TypeWithAttrsList->end(); I != E; ++I) {
+ Attrs.push_back((yyvsp[0].ParamAttrs));
+ for (TypeWithAttrsList::iterator I=(yyvsp[-2].TypeWithAttrsList)->begin(), E=(yyvsp[-2].TypeWithAttrsList)->end(); I != E; ++I) {
Params.push_back(I->Ty->get());
if (I->Ty->get() != Type::VoidTy)
Attrs.push_back(I->Attrs);
@@ -2785,20 +3483,21 @@ case 122:
bool isVarArg = Params.size() && Params.back() == Type::VoidTy;
if (isVarArg) Params.pop_back();
- FunctionType *FT = FunctionType::get(*yyvsp[-4].TypeVal, Params, isVarArg, Attrs);
- delete yyvsp[-2].TypeWithAttrsList; // Delete the argument list
- delete yyvsp[-4].TypeVal; // Delete the return type handle
- yyval.TypeVal = new PATypeHolder(HandleUpRefs(FT));
+ FunctionType *FT = FunctionType::get(*(yyvsp[-4].TypeVal), Params, isVarArg, Attrs);
+ delete (yyvsp[-2].TypeWithAttrsList); // Delete the argument list
+ delete (yyvsp[-4].TypeVal); // Delete the return type handle
+ (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(FT));
CHECK_FOR_ERROR
- ;
- break;}
-case 123:
-#line 1272 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 124:
+#line 1272 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
std::vector<const Type*> Params;
std::vector<FunctionType::ParameterAttributes> Attrs;
- Attrs.push_back(yyvsp[0].ParamAttrs);
- for (TypeWithAttrsList::iterator I=yyvsp[-2].TypeWithAttrsList->begin(), E=yyvsp[-2].TypeWithAttrsList->end(); I != E; ++I) {
+ Attrs.push_back((yyvsp[0].ParamAttrs));
+ for (TypeWithAttrsList::iterator I=(yyvsp[-2].TypeWithAttrsList)->begin(), E=(yyvsp[-2].TypeWithAttrsList)->end(); I != E; ++I) {
Params.push_back(I->Ty->get());
if (I->Ty->get() != Type::VoidTy)
Attrs.push_back(I->Attrs);
@@ -2806,282 +3505,303 @@ case 123:
bool isVarArg = Params.size() && Params.back() == Type::VoidTy;
if (isVarArg) Params.pop_back();
- FunctionType *FT = FunctionType::get(yyvsp[-4].PrimType, Params, isVarArg, Attrs);
- delete yyvsp[-2].TypeWithAttrsList; // Delete the argument list
- yyval.TypeVal = new PATypeHolder(HandleUpRefs(FT));
- CHECK_FOR_ERROR
- ;
- break;}
-case 124:
-#line 1290 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Sized array type?
- yyval.TypeVal = new PATypeHolder(HandleUpRefs(ArrayType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val)));
- delete yyvsp[-1].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 125:
-#line 1295 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Packed array type?
- const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get();
- if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val)
+ FunctionType *FT = FunctionType::get((yyvsp[-4].PrimType), Params, isVarArg, Attrs);
+ delete (yyvsp[-2].TypeWithAttrsList); // Delete the argument list
+ (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(FT));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 125:
+#line 1290 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Sized array type?
+ (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val))));
+ delete (yyvsp[-1].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 126:
+#line 1295 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Packed array type?
+ const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get();
+ if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val))
GEN_ERROR("Unsigned result not equal to signed result");
if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger())
- GEN_ERROR("Element type of a PackedType must be primitive");
- if (!isPowerOf2_32(yyvsp[-3].UInt64Val))
+ GEN_ERROR("Element type of a VectorType must be primitive");
+ if (!isPowerOf2_32((yyvsp[-3].UInt64Val)))
GEN_ERROR("Vector length should be a power of 2");
- yyval.TypeVal = new PATypeHolder(HandleUpRefs(PackedType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val)));
- delete yyvsp[-1].TypeVal;
+ (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(VectorType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val))));
+ delete (yyvsp[-1].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 126:
-#line 1307 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Structure type?
+ ;}
+ break;
+
+ case 127:
+#line 1307 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Structure type?
std::vector<const Type*> Elements;
- for (std::list<llvm::PATypeHolder>::iterator I = yyvsp[-1].TypeList->begin(),
- E = yyvsp[-1].TypeList->end(); I != E; ++I)
+ for (std::list<llvm::PATypeHolder>::iterator I = (yyvsp[-1].TypeList)->begin(),
+ E = (yyvsp[-1].TypeList)->end(); I != E; ++I)
Elements.push_back(*I);
- yyval.TypeVal = new PATypeHolder(HandleUpRefs(StructType::get(Elements)));
- delete yyvsp[-1].TypeList;
+ (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(StructType::get(Elements)));
+ delete (yyvsp[-1].TypeList);
CHECK_FOR_ERROR
- ;
- break;}
-case 127:
-#line 1317 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Empty structure type?
- yyval.TypeVal = new PATypeHolder(StructType::get(std::vector<const Type*>()));
+ ;}
+ break;
+
+ case 128:
+#line 1317 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Empty structure type?
+ (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector<const Type*>()));
CHECK_FOR_ERROR
- ;
- break;}
-case 128:
-#line 1321 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 129:
+#line 1321 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
std::vector<const Type*> Elements;
- for (std::list<llvm::PATypeHolder>::iterator I = yyvsp[-2].TypeList->begin(),
- E = yyvsp[-2].TypeList->end(); I != E; ++I)
+ for (std::list<llvm::PATypeHolder>::iterator I = (yyvsp[-2].TypeList)->begin(),
+ E = (yyvsp[-2].TypeList)->end(); I != E; ++I)
Elements.push_back(*I);
- yyval.TypeVal = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true)));
- delete yyvsp[-2].TypeList;
- CHECK_FOR_ERROR
- ;
- break;}
-case 129:
-#line 1331 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Empty structure type?
- yyval.TypeVal = new PATypeHolder(StructType::get(std::vector<const Type*>(), true));
- CHECK_FOR_ERROR
- ;
- break;}
-case 130:
-#line 1338 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeWithAttrs.Ty = yyvsp[-1].TypeVal;
- yyval.TypeWithAttrs.Attrs = yyvsp[0].ParamAttrs;
- ;
- break;}
-case 131:
-#line 1345 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true)));
+ delete (yyvsp[-2].TypeList);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 130:
+#line 1331 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Empty structure type?
+ (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector<const Type*>(), true));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 131:
+#line 1338 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeWithAttrs).Ty = (yyvsp[-1].TypeVal);
+ (yyval.TypeWithAttrs).Attrs = (yyvsp[0].ParamAttrs);
+ ;}
+ break;
+
+ case 132:
+#line 1345 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
- if (!(*yyvsp[0].TypeVal)->isFirstClassType())
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
+ if (!(*(yyvsp[0].TypeVal))->isFirstClassType())
GEN_ERROR("LLVM functions cannot return aggregate types");
- yyval.TypeVal = yyvsp[0].TypeVal;
- ;
- break;}
-case 132:
-#line 1352 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeVal = new PATypeHolder(Type::VoidTy);
- ;
- break;}
-case 133:
-#line 1357 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeWithAttrsList = new TypeWithAttrsList();
- yyval.TypeWithAttrsList->push_back(yyvsp[0].TypeWithAttrs);
+ (yyval.TypeVal) = (yyvsp[0].TypeVal);
+ ;}
+ break;
+
+ case 133:
+#line 1352 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeVal) = new PATypeHolder(Type::VoidTy);
+ ;}
+ break;
+
+ case 134:
+#line 1357 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeWithAttrsList) = new TypeWithAttrsList();
+ (yyval.TypeWithAttrsList)->push_back((yyvsp[0].TypeWithAttrs));
CHECK_FOR_ERROR
- ;
- break;}
-case 134:
-#line 1362 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- (yyval.TypeWithAttrsList=yyvsp[-2].TypeWithAttrsList)->push_back(yyvsp[0].TypeWithAttrs);
+ ;}
+ break;
+
+ case 135:
+#line 1362 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ ((yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList))->push_back((yyvsp[0].TypeWithAttrs));
CHECK_FOR_ERROR
- ;
- break;}
-case 136:
-#line 1370 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeWithAttrsList=yyvsp[-2].TypeWithAttrsList;
+ ;}
+ break;
+
+ case 137:
+#line 1370 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList);
TypeWithAttrs TWA; TWA.Attrs = FunctionType::NoAttributeSet;
TWA.Ty = new PATypeHolder(Type::VoidTy);
- yyval.TypeWithAttrsList->push_back(TWA);
+ (yyval.TypeWithAttrsList)->push_back(TWA);
CHECK_FOR_ERROR
- ;
- break;}
-case 137:
-#line 1377 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeWithAttrsList = new TypeWithAttrsList;
+ ;}
+ break;
+
+ case 138:
+#line 1377 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeWithAttrsList) = new TypeWithAttrsList;
TypeWithAttrs TWA; TWA.Attrs = FunctionType::NoAttributeSet;
TWA.Ty = new PATypeHolder(Type::VoidTy);
- yyval.TypeWithAttrsList->push_back(TWA);
+ (yyval.TypeWithAttrsList)->push_back(TWA);
CHECK_FOR_ERROR
- ;
- break;}
-case 138:
-#line 1384 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeWithAttrsList = new TypeWithAttrsList();
+ ;}
+ break;
+
+ case 139:
+#line 1384 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeWithAttrsList) = new TypeWithAttrsList();
CHECK_FOR_ERROR
- ;
- break;}
-case 139:
-#line 1392 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TypeList = new std::list<PATypeHolder>();
- yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal;
+ ;}
+ break;
+
+ case 140:
+#line 1392 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TypeList) = new std::list<PATypeHolder>();
+ (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 140:
-#line 1397 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal;
+ ;}
+ break;
+
+ case 141:
+#line 1397 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 141:
-#line 1408 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Nonempty unsized arr
+ ;}
+ break;
+
+ case 142:
+#line 1408 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Nonempty unsized arr
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-3].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-3].TypeVal)->get());
if (ATy == 0)
GEN_ERROR("Cannot make array constant with type: '" +
- (*yyvsp[-3].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-3].TypeVal))->getDescription() + "'");
const Type *ETy = ATy->getElementType();
int NumElements = ATy->getNumElements();
// Verify that we have the correct size...
- if (NumElements != -1 && NumElements != (int)yyvsp[-1].ConstVector->size())
+ if (NumElements != -1 && NumElements != (int)(yyvsp[-1].ConstVector)->size())
GEN_ERROR("Type mismatch: constant sized array initialized with " +
- utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " +
+ utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " +
itostr(NumElements) + "");
// Verify all elements are correct type!
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- if (ETy != (*yyvsp[-1].ConstVector)[i]->getType())
+ for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) {
+ if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType())
GEN_ERROR("Element #" + utostr(i) + " is not of type '" +
ETy->getDescription() +"' as required!\nIt is of type '"+
- (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'.");
+ (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'.");
}
- yyval.ConstVal = ConstantArray::get(ATy, *yyvsp[-1].ConstVector);
- delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector;
+ (yyval.ConstVal) = ConstantArray::get(ATy, *(yyvsp[-1].ConstVector));
+ delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector);
CHECK_FOR_ERROR
- ;
- break;}
-case 142:
-#line 1436 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 143:
+#line 1436 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-2].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-2].TypeVal)->get());
if (ATy == 0)
GEN_ERROR("Cannot make array constant with type: '" +
- (*yyvsp[-2].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-2].TypeVal))->getDescription() + "'");
int NumElements = ATy->getNumElements();
if (NumElements != -1 && NumElements != 0)
GEN_ERROR("Type mismatch: constant sized array initialized with 0"
" arguments, but has size of " + itostr(NumElements) +"");
- yyval.ConstVal = ConstantArray::get(ATy, std::vector<Constant*>());
- delete yyvsp[-2].TypeVal;
+ (yyval.ConstVal) = ConstantArray::get(ATy, std::vector<Constant*>());
+ delete (yyvsp[-2].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 143:
-#line 1452 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 144:
+#line 1452 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-2].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-2].TypeVal)->get());
if (ATy == 0)
GEN_ERROR("Cannot make array constant with type: '" +
- (*yyvsp[-2].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-2].TypeVal))->getDescription() + "'");
int NumElements = ATy->getNumElements();
const Type *ETy = ATy->getElementType();
- char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true);
- if (NumElements != -1 && NumElements != (EndStr-yyvsp[0].StrVal))
+ char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true);
+ if (NumElements != -1 && NumElements != (EndStr-(yyvsp[0].StrVal)))
GEN_ERROR("Can't build string constant of size " +
- itostr((int)(EndStr-yyvsp[0].StrVal)) +
+ itostr((int)(EndStr-(yyvsp[0].StrVal))) +
" when array has size " + itostr(NumElements) + "");
std::vector<Constant*> Vals;
if (ETy == Type::Int8Ty) {
- for (unsigned char *C = (unsigned char *)yyvsp[0].StrVal;
+ for (unsigned char *C = (unsigned char *)(yyvsp[0].StrVal);
C != (unsigned char*)EndStr; ++C)
Vals.push_back(ConstantInt::get(ETy, *C));
} else {
- free(yyvsp[0].StrVal);
+ free((yyvsp[0].StrVal));
GEN_ERROR("Cannot build string arrays of non byte sized elements");
}
- free(yyvsp[0].StrVal);
- yyval.ConstVal = ConstantArray::get(ATy, Vals);
- delete yyvsp[-2].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 144:
-#line 1481 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Nonempty unsized arr
+ free((yyvsp[0].StrVal));
+ (yyval.ConstVal) = ConstantArray::get(ATy, Vals);
+ delete (yyvsp[-2].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 145:
+#line 1481 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Nonempty unsized arr
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
- const PackedType *PTy = dyn_cast<PackedType>(yyvsp[-3].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
+ const VectorType *PTy = dyn_cast<VectorType>((yyvsp[-3].TypeVal)->get());
if (PTy == 0)
GEN_ERROR("Cannot make packed constant with type: '" +
- (*yyvsp[-3].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-3].TypeVal))->getDescription() + "'");
const Type *ETy = PTy->getElementType();
int NumElements = PTy->getNumElements();
// Verify that we have the correct size...
- if (NumElements != -1 && NumElements != (int)yyvsp[-1].ConstVector->size())
+ if (NumElements != -1 && NumElements != (int)(yyvsp[-1].ConstVector)->size())
GEN_ERROR("Type mismatch: constant sized packed initialized with " +
- utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " +
+ utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " +
itostr(NumElements) + "");
// Verify all elements are correct type!
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- if (ETy != (*yyvsp[-1].ConstVector)[i]->getType())
+ for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) {
+ if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType())
GEN_ERROR("Element #" + utostr(i) + " is not of type '" +
ETy->getDescription() +"' as required!\nIt is of type '"+
- (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'.");
+ (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'.");
}
- yyval.ConstVal = ConstantPacked::get(PTy, *yyvsp[-1].ConstVector);
- delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector;
+ (yyval.ConstVal) = ConstantVector::get(PTy, *(yyvsp[-1].ConstVector));
+ delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector);
CHECK_FOR_ERROR
- ;
- break;}
-case 145:
-#line 1509 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-3].TypeVal->get());
+ ;}
+ break;
+
+ case 146:
+#line 1509 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[-3].TypeVal)->get());
if (STy == 0)
GEN_ERROR("Cannot make struct constant with type: '" +
- (*yyvsp[-3].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-3].TypeVal))->getDescription() + "'");
- if (yyvsp[-1].ConstVector->size() != STy->getNumContainedTypes())
+ if ((yyvsp[-1].ConstVector)->size() != STy->getNumContainedTypes())
GEN_ERROR("Illegal number of initializers for structure type");
// Check to ensure that constants are compatible with the type initializer!
- for (unsigned i = 0, e = yyvsp[-1].ConstVector->size(); i != e; ++i)
- if ((*yyvsp[-1].ConstVector)[i]->getType() != STy->getElementType(i))
+ for (unsigned i = 0, e = (yyvsp[-1].ConstVector)->size(); i != e; ++i)
+ if ((*(yyvsp[-1].ConstVector))[i]->getType() != STy->getElementType(i))
GEN_ERROR("Expected type '" +
STy->getElementType(i)->getDescription() +
"' for element #" + utostr(i) +
@@ -3091,20 +3811,21 @@ case 145:
if (STy->isPacked())
GEN_ERROR("Unpacked Initializer to packed type '" + STy->getDescription() + "'");
- yyval.ConstVal = ConstantStruct::get(STy, *yyvsp[-1].ConstVector);
- delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector;
+ (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[-1].ConstVector));
+ delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector);
CHECK_FOR_ERROR
- ;
- break;}
-case 146:
-#line 1534 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 147:
+#line 1534 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
- const StructType *STy = dyn_cast<StructType>(yyvsp[-2].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
+ const StructType *STy = dyn_cast<StructType>((yyvsp[-2].TypeVal)->get());
if (STy == 0)
GEN_ERROR("Cannot make struct constant with type: '" +
- (*yyvsp[-2].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-2].TypeVal))->getDescription() + "'");
if (STy->getNumContainedTypes() != 0)
GEN_ERROR("Illegal number of initializers for structure type");
@@ -3113,25 +3834,26 @@ case 146:
if (STy->isPacked())
GEN_ERROR("Unpacked Initializer to packed type '" + STy->getDescription() + "'");
- yyval.ConstVal = ConstantStruct::get(STy, std::vector<Constant*>());
- delete yyvsp[-2].TypeVal;
+ (yyval.ConstVal) = ConstantStruct::get(STy, std::vector<Constant*>());
+ delete (yyvsp[-2].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 147:
-#line 1553 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-5].TypeVal->get());
+ ;}
+ break;
+
+ case 148:
+#line 1553 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[-5].TypeVal)->get());
if (STy == 0)
GEN_ERROR("Cannot make struct constant with type: '" +
- (*yyvsp[-5].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-5].TypeVal))->getDescription() + "'");
- if (yyvsp[-2].ConstVector->size() != STy->getNumContainedTypes())
+ if ((yyvsp[-2].ConstVector)->size() != STy->getNumContainedTypes())
GEN_ERROR("Illegal number of initializers for structure type");
// Check to ensure that constants are compatible with the type initializer!
- for (unsigned i = 0, e = yyvsp[-2].ConstVector->size(); i != e; ++i)
- if ((*yyvsp[-2].ConstVector)[i]->getType() != STy->getElementType(i))
+ for (unsigned i = 0, e = (yyvsp[-2].ConstVector)->size(); i != e; ++i)
+ if ((*(yyvsp[-2].ConstVector))[i]->getType() != STy->getElementType(i))
GEN_ERROR("Expected type '" +
STy->getElementType(i)->getDescription() +
"' for element #" + utostr(i) +
@@ -3141,20 +3863,21 @@ case 147:
if (!STy->isPacked())
GEN_ERROR("Packed Initializer to unpacked type '" + STy->getDescription() + "'");
- yyval.ConstVal = ConstantStruct::get(STy, *yyvsp[-2].ConstVector);
- delete yyvsp[-5].TypeVal; delete yyvsp[-2].ConstVector;
+ (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[-2].ConstVector));
+ delete (yyvsp[-5].TypeVal); delete (yyvsp[-2].ConstVector);
CHECK_FOR_ERROR
- ;
- break;}
-case 148:
-#line 1578 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 149:
+#line 1578 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription());
- const StructType *STy = dyn_cast<StructType>(yyvsp[-4].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription());
+ const StructType *STy = dyn_cast<StructType>((yyvsp[-4].TypeVal)->get());
if (STy == 0)
GEN_ERROR("Cannot make struct constant with type: '" +
- (*yyvsp[-4].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-4].TypeVal))->getDescription() + "'");
if (STy->getNumContainedTypes() != 0)
GEN_ERROR("Illegal number of initializers for structure type");
@@ -3163,42 +3886,45 @@ case 148:
if (!STy->isPacked())
GEN_ERROR("Packed Initializer to unpacked type '" + STy->getDescription() + "'");
- yyval.ConstVal = ConstantStruct::get(STy, std::vector<Constant*>());
- delete yyvsp[-4].TypeVal;
+ (yyval.ConstVal) = ConstantStruct::get(STy, std::vector<Constant*>());
+ delete (yyvsp[-4].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 149:
-#line 1597 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 150:
+#line 1597 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- const PointerType *PTy = dyn_cast<PointerType>(yyvsp[-1].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ const PointerType *PTy = dyn_cast<PointerType>((yyvsp[-1].TypeVal)->get());
if (PTy == 0)
GEN_ERROR("Cannot make null pointer constant with type: '" +
- (*yyvsp[-1].TypeVal)->getDescription() + "'");
+ (*(yyvsp[-1].TypeVal))->getDescription() + "'");
- yyval.ConstVal = ConstantPointerNull::get(PTy);
- delete yyvsp[-1].TypeVal;
+ (yyval.ConstVal) = ConstantPointerNull::get(PTy);
+ delete (yyvsp[-1].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 150:
-#line 1609 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 151:
+#line 1609 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get());
- delete yyvsp[-1].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 151:
-#line 1616 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ (yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get());
+ delete (yyvsp[-1].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 152:
+#line 1616 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- const PointerType *Ty = dyn_cast<PointerType>(yyvsp[-1].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ const PointerType *Ty = dyn_cast<PointerType>((yyvsp[-1].TypeVal)->get());
if (Ty == 0)
GEN_ERROR("Global const reference must be a pointer type");
@@ -3212,7 +3938,7 @@ case 151:
Function *SavedCurFn = CurFun.CurrentFunction;
CurFun.CurrentFunction = 0;
- Value *V = getValNonImprovising(Ty, yyvsp[0].ValIDVal);
+ Value *V = getValNonImprovising(Ty, (yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
CurFun.CurrentFunction = SavedCurFn;
@@ -3227,16 +3953,16 @@ case 151:
// First check to see if the forward references value is already created!
PerModuleInfo::GlobalRefsType::iterator I =
- CurModule.GlobalRefs.find(std::make_pair(PT, yyvsp[0].ValIDVal));
+ CurModule.GlobalRefs.find(std::make_pair(PT, (yyvsp[0].ValIDVal)));
if (I != CurModule.GlobalRefs.end()) {
V = I->second; // Placeholder already exists, use it...
- yyvsp[0].ValIDVal.destroy();
+ (yyvsp[0].ValIDVal).destroy();
} else {
std::string Name;
- if (yyvsp[0].ValIDVal.Type == ValID::GlobalName)
- Name = yyvsp[0].ValIDVal.Name;
- else if (yyvsp[0].ValIDVal.Type != ValID::GlobalID)
+ if ((yyvsp[0].ValIDVal).Type == ValID::GlobalName)
+ Name = (yyvsp[0].ValIDVal).Name;
+ else if ((yyvsp[0].ValIDVal).Type != ValID::GlobalID)
GEN_ERROR("Invalid reference to global");
// Create the forward referenced global.
@@ -3252,271 +3978,300 @@ case 151:
}
// Keep track of the fact that we have a forward ref to recycle it
- CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, yyvsp[0].ValIDVal), GV));
+ CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, (yyvsp[0].ValIDVal)), GV));
V = GV;
}
}
- yyval.ConstVal = cast<GlobalValue>(V);
- delete yyvsp[-1].TypeVal; // Free the type handle
+ (yyval.ConstVal) = cast<GlobalValue>(V);
+ delete (yyvsp[-1].TypeVal); // Free the type handle
CHECK_FOR_ERROR
- ;
- break;}
-case 152:
-#line 1682 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 153:
+#line 1682 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType())
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType())
GEN_ERROR("Mismatched types for constant expression: " +
- (*yyvsp[-1].TypeVal)->getDescription() + " and " + yyvsp[0].ConstVal->getType()->getDescription());
- yyval.ConstVal = yyvsp[0].ConstVal;
- delete yyvsp[-1].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 153:
-#line 1692 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ (*(yyvsp[-1].TypeVal))->getDescription() + " and " + (yyvsp[0].ConstVal)->getType()->getDescription());
+ (yyval.ConstVal) = (yyvsp[0].ConstVal);
+ delete (yyvsp[-1].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 154:
+#line 1692 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- const Type *Ty = yyvsp[-1].TypeVal->get();
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ const Type *Ty = (yyvsp[-1].TypeVal)->get();
if (isa<FunctionType>(Ty) || Ty == Type::LabelTy || isa<OpaqueType>(Ty))
GEN_ERROR("Cannot create a null initialized value of this type");
- yyval.ConstVal = Constant::getNullValue(Ty);
- delete yyvsp[-1].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 154:
-#line 1702 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // integral constants
- if (!ConstantInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val))
+ (yyval.ConstVal) = Constant::getNullValue(Ty);
+ delete (yyvsp[-1].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 155:
+#line 1702 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // integral constants
+ if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val)))
GEN_ERROR("Constant value doesn't fit in type");
- yyval.ConstVal = ConstantInt::get(yyvsp[-1].PrimType, yyvsp[0].SInt64Val);
- CHECK_FOR_ERROR
- ;
- break;}
-case 155:
-#line 1708 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // integral constants
- if (!ConstantInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val))
+ (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 156:
+#line 1708 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // integral constants
+ if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val)))
GEN_ERROR("Constant value doesn't fit in type");
- yyval.ConstVal = ConstantInt::get(yyvsp[-1].PrimType, yyvsp[0].UInt64Val);
- CHECK_FOR_ERROR
- ;
- break;}
-case 156:
-#line 1714 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Boolean constants
- assert(cast<IntegerType>(yyvsp[-1].PrimType)->getBitWidth() == 1 && "Not Bool?");
- yyval.ConstVal = ConstantInt::getTrue();
- CHECK_FOR_ERROR
- ;
- break;}
-case 157:
-#line 1719 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Boolean constants
- assert(cast<IntegerType>(yyvsp[-1].PrimType)->getBitWidth() == 1 && "Not Bool?");
- yyval.ConstVal = ConstantInt::getFalse();
- CHECK_FOR_ERROR
- ;
- break;}
-case 158:
-#line 1724 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Float & Double constants
- if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal))
+ (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 157:
+#line 1714 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Boolean constants
+ assert(cast<IntegerType>((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?");
+ (yyval.ConstVal) = ConstantInt::getTrue();
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 158:
+#line 1719 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Boolean constants
+ assert(cast<IntegerType>((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?");
+ (yyval.ConstVal) = ConstantInt::getFalse();
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 159:
+#line 1724 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Float & Double constants
+ if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal)))
GEN_ERROR("Floating point constant invalid for type");
- yyval.ConstVal = ConstantFP::get(yyvsp[-1].PrimType, yyvsp[0].FPVal);
+ (yyval.ConstVal) = ConstantFP::get((yyvsp[-1].PrimType), (yyvsp[0].FPVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 159:
-#line 1732 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 160:
+#line 1732 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- Constant *Val = yyvsp[-3].ConstVal;
- const Type *DestTy = yyvsp[-1].TypeVal->get();
- if (!CastInst::castIsValid(yyvsp[-5].CastOpVal, yyvsp[-3].ConstVal, DestTy))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ Constant *Val = (yyvsp[-3].ConstVal);
+ const Type *DestTy = (yyvsp[-1].TypeVal)->get();
+ if (!CastInst::castIsValid((yyvsp[-5].CastOpVal), (yyvsp[-3].ConstVal), DestTy))
GEN_ERROR("invalid cast opcode for cast from '" +
Val->getType()->getDescription() + "' to '" +
DestTy->getDescription() + "'");
- yyval.ConstVal = ConstantExpr::getCast(yyvsp[-5].CastOpVal, yyvsp[-3].ConstVal, DestTy);
- delete yyvsp[-1].TypeVal;
- ;
- break;}
-case 160:
-#line 1744 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (!isa<PointerType>(yyvsp[-2].ConstVal->getType()))
+ (yyval.ConstVal) = ConstantExpr::getCast((yyvsp[-5].CastOpVal), (yyvsp[-3].ConstVal), DestTy);
+ delete (yyvsp[-1].TypeVal);
+ ;}
+ break;
+
+ case 161:
+#line 1744 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (!isa<PointerType>((yyvsp[-2].ConstVal)->getType()))
GEN_ERROR("GetElementPtr requires a pointer operand");
const Type *IdxTy =
- GetElementPtrInst::getIndexedType(yyvsp[-2].ConstVal->getType(), &(*yyvsp[-1].ValueList)[0], yyvsp[-1].ValueList->size(),
+ GetElementPtrInst::getIndexedType((yyvsp[-2].ConstVal)->getType(), &(*(yyvsp[-1].ValueList))[0], (yyvsp[-1].ValueList)->size(),
true);
if (!IdxTy)
GEN_ERROR("Index list invalid for constant getelementptr");
SmallVector<Constant*, 8> IdxVec;
- for (unsigned i = 0, e = yyvsp[-1].ValueList->size(); i != e; ++i)
- if (Constant *C = dyn_cast<Constant>((*yyvsp[-1].ValueList)[i]))
+ for (unsigned i = 0, e = (yyvsp[-1].ValueList)->size(); i != e; ++i)
+ if (Constant *C = dyn_cast<Constant>((*(yyvsp[-1].ValueList))[i]))
IdxVec.push_back(C);
else
GEN_ERROR("Indices to constant getelementptr must be constants");
- delete yyvsp[-1].ValueList;
+ delete (yyvsp[-1].ValueList);
- yyval.ConstVal = ConstantExpr::getGetElementPtr(yyvsp[-2].ConstVal, &IdxVec[0], IdxVec.size());
+ (yyval.ConstVal) = ConstantExpr::getGetElementPtr((yyvsp[-2].ConstVal), &IdxVec[0], IdxVec.size());
CHECK_FOR_ERROR
- ;
- break;}
-case 161:
-#line 1766 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (yyvsp[-5].ConstVal->getType() != Type::Int1Ty)
+ ;}
+ break;
+
+ case 162:
+#line 1766 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((yyvsp[-5].ConstVal)->getType() != Type::Int1Ty)
GEN_ERROR("Select condition must be of boolean type");
- if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
+ if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
GEN_ERROR("Select operand types must match");
- yyval.ConstVal = ConstantExpr::getSelect(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
+ (yyval.ConstVal) = ConstantExpr::getSelect((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 162:
-#line 1774 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
+ ;}
+ break;
+
+ case 163:
+#line 1774 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
GEN_ERROR("Binary operator types must match");
CHECK_FOR_ERROR;
- yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
- ;
- break;}
-case 163:
-#line 1780 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
+ (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal));
+ ;}
+ break;
+
+ case 164:
+#line 1780 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
GEN_ERROR("Logical operator types must match");
- if (!yyvsp[-3].ConstVal->getType()->isInteger()) {
- if (Instruction::isShift(yyvsp[-5].BinaryOpVal) || !isa<PackedType>(yyvsp[-3].ConstVal->getType()) ||
- !cast<PackedType>(yyvsp[-3].ConstVal->getType())->getElementType()->isInteger())
+ if (!(yyvsp[-3].ConstVal)->getType()->isInteger()) {
+ if (Instruction::isShift((yyvsp[-5].BinaryOpVal)) || !isa<VectorType>((yyvsp[-3].ConstVal)->getType()) ||
+ !cast<VectorType>((yyvsp[-3].ConstVal)->getType())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands");
}
- yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
+ (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 164:
-#line 1791 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
+ ;}
+ break;
+
+ case 165:
+#line 1791 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
GEN_ERROR("icmp operand types must match");
- yyval.ConstVal = ConstantExpr::getICmp(yyvsp[-5].IPredicate, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
- ;
- break;}
-case 165:
-#line 1796 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
+ (yyval.ConstVal) = ConstantExpr::getICmp((yyvsp[-5].IPredicate), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal));
+ ;}
+ break;
+
+ case 166:
+#line 1796 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
GEN_ERROR("fcmp operand types must match");
- yyval.ConstVal = ConstantExpr::getFCmp(yyvsp[-5].FPredicate, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
- ;
- break;}
-case 166:
-#line 1801 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (!ExtractElementInst::isValidOperands(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
+ (yyval.ConstVal) = ConstantExpr::getFCmp((yyvsp[-5].FPredicate), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal));
+ ;}
+ break;
+
+ case 167:
+#line 1801 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
GEN_ERROR("Invalid extractelement operands");
- yyval.ConstVal = ConstantExpr::getExtractElement(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
+ (yyval.ConstVal) = ConstantExpr::getExtractElement((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 167:
-#line 1807 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (!InsertElementInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
+ ;}
+ break;
+
+ case 168:
+#line 1807 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
GEN_ERROR("Invalid insertelement operands");
- yyval.ConstVal = ConstantExpr::getInsertElement(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
+ (yyval.ConstVal) = ConstantExpr::getInsertElement((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 168:
-#line 1813 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (!ShuffleVectorInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
+ ;}
+ break;
+
+ case 169:
+#line 1813 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
GEN_ERROR("Invalid shufflevector operands");
- yyval.ConstVal = ConstantExpr::getShuffleVector(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
+ (yyval.ConstVal) = ConstantExpr::getShuffleVector((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 169:
-#line 1822 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal);
+ ;}
+ break;
+
+ case 170:
+#line 1822 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 170:
-#line 1826 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ConstVector = new std::vector<Constant*>();
- yyval.ConstVector->push_back(yyvsp[0].ConstVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 171:
-#line 1834 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.BoolVal = false; ;
- break;}
-case 172:
-#line 1834 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.BoolVal = true; ;
- break;}
-case 173:
-#line 1845 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ModuleVal = ParserResult = CurModule.CurrentModule;
+ ;}
+ break;
+
+ case 171:
+#line 1826 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ConstVector) = new std::vector<Constant*>();
+ (yyval.ConstVector)->push_back((yyvsp[0].ConstVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 172:
+#line 1834 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.BoolVal) = false; ;}
+ break;
+
+ case 173:
+#line 1834 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.BoolVal) = true; ;}
+ break;
+
+ case 174:
+#line 1845 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
CurModule.ModuleDone();
CHECK_FOR_ERROR;
- ;
- break;}
-case 174:
-#line 1850 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ModuleVal = ParserResult = CurModule.CurrentModule;
+ ;}
+ break;
+
+ case 175:
+#line 1850 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
CurModule.ModuleDone();
CHECK_FOR_ERROR;
- ;
- break;}
-case 177:
-#line 1863 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ CurFun.isDeclare = false; ;
- break;}
-case 178:
-#line 1863 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 178:
+#line 1863 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { CurFun.isDeclare = false; ;}
+ break;
+
+ case 179:
+#line 1863 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CurFun.FunctionDone();
CHECK_FOR_ERROR
- ;
- break;}
-case 179:
-#line 1867 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ CurFun.isDeclare = true; ;
- break;}
-case 180:
-#line 1867 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 180:
+#line 1867 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { CurFun.isDeclare = true; ;}
+ break;
+
+ case 181:
+#line 1867 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CHECK_FOR_ERROR
- ;
- break;}
-case 181:
-#line 1870 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 182:
+#line 1870 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CHECK_FOR_ERROR
- ;
- break;}
-case 182:
-#line 1873 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 183:
+#line 1873 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
// Emit an error if there are any unresolved types left.
if (!CurModule.LateResolveTypes.empty()) {
const ValID &DID = CurModule.LateResolveTypes.begin()->first;
@@ -3527,13 +4282,14 @@ case 182:
}
}
CHECK_FOR_ERROR
- ;
- break;}
-case 183:
-#line 1885 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 184:
+#line 1885 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
// Eagerly resolve types. This is not an optimization, this is a
// requirement that is due to the fact that we could have this:
//
@@ -3543,226 +4299,248 @@ case 183:
// If types are not resolved eagerly, then the two types will not be
// determined to be the same type!
//
- ResolveTypeTo(yyvsp[-2].StrVal, *yyvsp[0].TypeVal);
+ ResolveTypeTo((yyvsp[-2].StrVal), *(yyvsp[0].TypeVal));
- if (!setTypeName(*yyvsp[0].TypeVal, yyvsp[-2].StrVal) && !yyvsp[-2].StrVal) {
+ if (!setTypeName(*(yyvsp[0].TypeVal), (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) {
CHECK_FOR_ERROR
// If this is a named type that is not a redefinition, add it to the slot
// table.
- CurModule.Types.push_back(*yyvsp[0].TypeVal);
+ CurModule.Types.push_back(*(yyvsp[0].TypeVal));
}
- delete yyvsp[0].TypeVal;
+ delete (yyvsp[0].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 184:
-#line 1909 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- ResolveTypeTo(yyvsp[-2].StrVal, yyvsp[0].PrimType);
+ ;}
+ break;
+
+ case 185:
+#line 1909 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ ResolveTypeTo((yyvsp[-2].StrVal), (yyvsp[0].PrimType));
- if (!setTypeName(yyvsp[0].PrimType, yyvsp[-2].StrVal) && !yyvsp[-2].StrVal) {
+ if (!setTypeName((yyvsp[0].PrimType), (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) {
CHECK_FOR_ERROR
// If this is a named type that is not a redefinition, add it to the slot
// table.
- CurModule.Types.push_back(yyvsp[0].PrimType);
+ CurModule.Types.push_back((yyvsp[0].PrimType));
}
CHECK_FOR_ERROR
- ;
- break;}
-case 185:
-#line 1920 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 186:
+#line 1920 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
/* "Externally Visible" Linkage */
- if (yyvsp[0].ConstVal == 0)
+ if ((yyvsp[0].ConstVal) == 0)
GEN_ERROR("Global value initializer is not a constant");
- CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage,
- yyvsp[-2].Visibility, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal);
+ CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage,
+ (yyvsp[-2].Visibility), (yyvsp[-1].BoolVal), (yyvsp[0].ConstVal)->getType(), (yyvsp[0].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 186:
-#line 1927 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 187:
+#line 1927 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 187:
-#line 1930 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (yyvsp[0].ConstVal == 0)
+ ;}
+ break;
+
+ case 188:
+#line 1930 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((yyvsp[0].ConstVal) == 0)
GEN_ERROR("Global value initializer is not a constant");
- CurGV = ParseGlobalVariable(yyvsp[-4].StrVal, yyvsp[-3].Linkage, yyvsp[-2].Visibility, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal);
+ CurGV = ParseGlobalVariable((yyvsp[-4].StrVal), (yyvsp[-3].Linkage), (yyvsp[-2].Visibility), (yyvsp[-1].BoolVal), (yyvsp[0].ConstVal)->getType(), (yyvsp[0].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 188:
-#line 1935 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 189:
+#line 1935 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 189:
-#line 1938 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 190:
+#line 1938 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
- CurGV = ParseGlobalVariable(yyvsp[-4].StrVal, yyvsp[-3].Linkage, yyvsp[-2].Visibility, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0);
- CHECK_FOR_ERROR
- delete yyvsp[0].TypeVal;
- ;
- break;}
-case 190:
-#line 1944 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
+ CurGV = ParseGlobalVariable((yyvsp[-4].StrVal), (yyvsp[-3].Linkage), (yyvsp[-2].Visibility), (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0);
+ CHECK_FOR_ERROR
+ delete (yyvsp[0].TypeVal);
+ ;}
+ break;
+
+ case 191:
+#line 1944 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CurGV = 0;
CHECK_FOR_ERROR
- ;
- break;}
-case 191:
-#line 1948 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 192:
+#line 1948 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CHECK_FOR_ERROR
- ;
- break;}
-case 192:
-#line 1951 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 193:
+#line 1951 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CHECK_FOR_ERROR
- ;
- break;}
-case 193:
-#line 1957 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 194:
+#line 1957 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
- char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true);
- std::string NewAsm(yyvsp[0].StrVal, EndStr);
- free(yyvsp[0].StrVal);
+ char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true);
+ std::string NewAsm((yyvsp[0].StrVal), EndStr);
+ free((yyvsp[0].StrVal));
if (AsmSoFar.empty())
CurModule.CurrentModule->setModuleInlineAsm(NewAsm);
else
CurModule.CurrentModule->setModuleInlineAsm(AsmSoFar+"\n"+NewAsm);
CHECK_FOR_ERROR
-;
- break;}
-case 194:
-#line 1970 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 195:
-#line 1974 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- CurModule.CurrentModule->setDataLayout(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 197:
-#line 1981 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
+;}
+ break;
+
+ case 195:
+#line 1970 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 196:
+#line 1974 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 198:
+#line 1981 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 198:
-#line 1986 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
+ ;}
+ break;
+
+ case 199:
+#line 1986 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 199:
-#line 1991 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 200:
+#line 1991 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
CHECK_FOR_ERROR
- ;
- break;}
-case 200:
-#line 2000 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 201:
+#line 2000 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
- if (*yyvsp[-2].TypeVal == Type::VoidTy)
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
+ if (*(yyvsp[-2].TypeVal) == Type::VoidTy)
GEN_ERROR("void typed arguments are invalid");
- ArgListEntry E; E.Attrs = yyvsp[-1].ParamAttrs; E.Ty = yyvsp[-2].TypeVal; E.Name = yyvsp[0].StrVal;
- yyval.ArgList = yyvsp[-4].ArgList;
- yyvsp[-4].ArgList->push_back(E);
- CHECK_FOR_ERROR
- ;
- break;}
-case 201:
-#line 2010 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ArgListEntry E; E.Attrs = (yyvsp[-1].ParamAttrs); E.Ty = (yyvsp[-2].TypeVal); E.Name = (yyvsp[0].StrVal);
+ (yyval.ArgList) = (yyvsp[-4].ArgList);
+ (yyvsp[-4].ArgList)->push_back(E);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 202:
+#line 2010 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
- if (*yyvsp[-2].TypeVal == Type::VoidTy)
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
+ if (*(yyvsp[-2].TypeVal) == Type::VoidTy)
GEN_ERROR("void typed arguments are invalid");
- ArgListEntry E; E.Attrs = yyvsp[-1].ParamAttrs; E.Ty = yyvsp[-2].TypeVal; E.Name = yyvsp[0].StrVal;
- yyval.ArgList = new ArgListType;
- yyval.ArgList->push_back(E);
- CHECK_FOR_ERROR
- ;
- break;}
-case 202:
-#line 2021 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ArgList = yyvsp[0].ArgList;
+ ArgListEntry E; E.Attrs = (yyvsp[-1].ParamAttrs); E.Ty = (yyvsp[-2].TypeVal); E.Name = (yyvsp[0].StrVal);
+ (yyval.ArgList) = new ArgListType;
+ (yyval.ArgList)->push_back(E);
CHECK_FOR_ERROR
- ;
- break;}
-case 203:
-#line 2025 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ArgList = yyvsp[-2].ArgList;
+ ;}
+ break;
+
+ case 203:
+#line 2021 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ArgList) = (yyvsp[0].ArgList);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 204:
+#line 2025 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ArgList) = (yyvsp[-2].ArgList);
struct ArgListEntry E;
E.Ty = new PATypeHolder(Type::VoidTy);
E.Name = 0;
E.Attrs = FunctionType::NoAttributeSet;
- yyval.ArgList->push_back(E);
+ (yyval.ArgList)->push_back(E);
CHECK_FOR_ERROR
- ;
- break;}
-case 204:
-#line 2034 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ArgList = new ArgListType;
+ ;}
+ break;
+
+ case 205:
+#line 2034 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ArgList) = new ArgListType;
struct ArgListEntry E;
E.Ty = new PATypeHolder(Type::VoidTy);
E.Name = 0;
E.Attrs = FunctionType::NoAttributeSet;
- yyval.ArgList->push_back(E);
+ (yyval.ArgList)->push_back(E);
CHECK_FOR_ERROR
- ;
- break;}
-case 205:
-#line 2043 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ArgList = 0;
+ ;}
+ break;
+
+ case 206:
+#line 2043 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ArgList) = 0;
CHECK_FOR_ERROR
- ;
- break;}
-case 206:
-#line 2049 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- UnEscapeLexed(yyvsp[-6].StrVal);
- std::string FunctionName(yyvsp[-6].StrVal);
- free(yyvsp[-6].StrVal); // Free strdup'd memory!
+ ;}
+ break;
+
+ case 207:
+#line 2049 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ UnEscapeLexed((yyvsp[-6].StrVal));
+ std::string FunctionName((yyvsp[-6].StrVal));
+ free((yyvsp[-6].StrVal)); // Free strdup'd memory!
// Check the function result for abstractness if this is a define. We should
// have no abstract types at this point
- if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(yyvsp[-7].TypeVal))
- GEN_ERROR("Reference to abstract result: "+ yyvsp[-7].TypeVal->get()->getDescription());
+ if (!CurFun.isDeclare && CurModule.TypeIsUnresolved((yyvsp[-7].TypeVal)))
+ GEN_ERROR("Reference to abstract result: "+ (yyvsp[-7].TypeVal)->get()->getDescription());
std::vector<const Type*> ParamTypeList;
std::vector<FunctionType::ParameterAttributes> ParamAttrs;
- ParamAttrs.push_back(yyvsp[-2].ParamAttrs);
- if (yyvsp[-4].ArgList) { // If there are arguments...
- for (ArgListType::iterator I = yyvsp[-4].ArgList->begin(); I != yyvsp[-4].ArgList->end(); ++I) {
+ ParamAttrs.push_back((yyvsp[-2].ParamAttrs));
+ if ((yyvsp[-4].ArgList)) { // If there are arguments...
+ for (ArgListType::iterator I = (yyvsp[-4].ArgList)->begin(); I != (yyvsp[-4].ArgList)->end(); ++I) {
const Type* Ty = I->Ty->get();
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
@@ -3775,10 +4553,10 @@ case 206:
bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy;
if (isVarArg) ParamTypeList.pop_back();
- FunctionType *FT = FunctionType::get(*yyvsp[-7].TypeVal, ParamTypeList, isVarArg,
+ FunctionType *FT = FunctionType::get(*(yyvsp[-7].TypeVal), ParamTypeList, isVarArg,
ParamAttrs);
const PointerType *PFT = PointerType::get(FT);
- delete yyvsp[-7].TypeVal;
+ delete (yyvsp[-7].TypeVal);
ValID ID;
if (!FunctionName.empty()) {
@@ -3827,26 +4605,26 @@ case 206:
Fn->setLinkage(CurFun.Linkage);
Fn->setVisibility(CurFun.Visibility);
}
- Fn->setCallingConv(yyvsp[-8].UIntVal);
- Fn->setAlignment(yyvsp[0].UIntVal);
- if (yyvsp[-1].StrVal) {
- Fn->setSection(yyvsp[-1].StrVal);
- free(yyvsp[-1].StrVal);
+ Fn->setCallingConv((yyvsp[-8].UIntVal));
+ Fn->setAlignment((yyvsp[0].UIntVal));
+ if ((yyvsp[-1].StrVal)) {
+ Fn->setSection((yyvsp[-1].StrVal));
+ free((yyvsp[-1].StrVal));
}
// Add all of the arguments we parsed to the function...
- if (yyvsp[-4].ArgList) { // Is null if empty...
+ if ((yyvsp[-4].ArgList)) { // Is null if empty...
if (isVarArg) { // Nuke the last entry
- assert(yyvsp[-4].ArgList->back().Ty->get() == Type::VoidTy && yyvsp[-4].ArgList->back().Name == 0 &&
+ assert((yyvsp[-4].ArgList)->back().Ty->get() == Type::VoidTy && (yyvsp[-4].ArgList)->back().Name == 0 &&
"Not a varargs marker!");
- delete yyvsp[-4].ArgList->back().Ty;
- yyvsp[-4].ArgList->pop_back(); // Delete the last entry
+ delete (yyvsp[-4].ArgList)->back().Ty;
+ (yyvsp[-4].ArgList)->pop_back(); // Delete the last entry
}
Function::arg_iterator ArgIt = Fn->arg_begin();
Function::arg_iterator ArgEnd = Fn->arg_end();
unsigned Idx = 1;
- for (ArgListType::iterator I = yyvsp[-4].ArgList->begin();
- I != yyvsp[-4].ArgList->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
+ for (ArgListType::iterator I = (yyvsp[-4].ArgList)->begin();
+ I != (yyvsp[-4].ArgList)->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
delete I->Ty; // Delete the typeholder...
setValueName(ArgIt, I->Name); // Insert arg into symtab...
CHECK_FOR_ERROR
@@ -3854,237 +4632,263 @@ case 206:
Idx++;
}
- delete yyvsp[-4].ArgList; // We're now done with the argument list
+ delete (yyvsp[-4].ArgList); // We're now done with the argument list
}
CHECK_FOR_ERROR
-;
- break;}
-case 209:
-#line 2162 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.FunctionVal = CurFun.CurrentFunction;
+;}
+ break;
+
+ case 210:
+#line 2162 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.FunctionVal) = CurFun.CurrentFunction;
// Make sure that we keep track of the linkage type even if there was a
// previous "declare".
- yyval.FunctionVal->setLinkage(yyvsp[-3].Linkage);
- yyval.FunctionVal->setVisibility(yyvsp[-2].Visibility);
-;
- break;}
-case 212:
-#line 2173 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
+ (yyval.FunctionVal)->setLinkage((yyvsp[-3].Linkage));
+ (yyval.FunctionVal)->setVisibility((yyvsp[-2].Visibility));
+;}
+ break;
+
+ case 213:
+#line 2173 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
CHECK_FOR_ERROR
-;
- break;}
-case 213:
-#line 2178 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- CurFun.CurrentFunction->setLinkage(yyvsp[-2].Linkage);
- CurFun.CurrentFunction->setVisibility(yyvsp[-1].Visibility);
- yyval.FunctionVal = CurFun.CurrentFunction;
+;}
+ break;
+
+ case 214:
+#line 2178 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ CurFun.CurrentFunction->setLinkage((yyvsp[-2].Linkage));
+ CurFun.CurrentFunction->setVisibility((yyvsp[-1].Visibility));
+ (yyval.FunctionVal) = CurFun.CurrentFunction;
CurFun.FunctionDone();
CHECK_FOR_ERROR
- ;
- break;}
-case 214:
-#line 2190 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.BoolVal = false;
+ ;}
+ break;
+
+ case 215:
+#line 2190 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.BoolVal) = false;
CHECK_FOR_ERROR
- ;
- break;}
-case 215:
-#line 2194 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.BoolVal = true;
- CHECK_FOR_ERROR
- ;
- break;}
-case 216:
-#line 2199 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // A reference to a direct constant
- yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val);
- CHECK_FOR_ERROR
- ;
- break;}
-case 217:
-#line 2203 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val);
- CHECK_FOR_ERROR
- ;
- break;}
-case 218:
-#line 2207 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Perhaps it's an FP constant?
- yyval.ValIDVal = ValID::create(yyvsp[0].FPVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 219:
-#line 2211 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ValIDVal = ValID::create(ConstantInt::getTrue());
+ ;}
+ break;
+
+ case 216:
+#line 2194 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.BoolVal) = true;
CHECK_FOR_ERROR
- ;
- break;}
-case 220:
-#line 2215 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ValIDVal = ValID::create(ConstantInt::getFalse());
+ ;}
+ break;
+
+ case 217:
+#line 2199 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // A reference to a direct constant
+ (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val));
CHECK_FOR_ERROR
- ;
- break;}
-case 221:
-#line 2219 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ValIDVal = ValID::createNull();
+ ;}
+ break;
+
+ case 218:
+#line 2203 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val));
CHECK_FOR_ERROR
- ;
- break;}
-case 222:
-#line 2223 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ValIDVal = ValID::createUndef();
- CHECK_FOR_ERROR
- ;
- break;}
-case 223:
-#line 2227 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // A vector zero constant.
- yyval.ValIDVal = ValID::createZeroInit();
- CHECK_FOR_ERROR
- ;
- break;}
-case 224:
-#line 2231 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Nonempty unsized packed vector
- const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType();
- int NumElements = yyvsp[-1].ConstVector->size();
+ ;}
+ break;
+
+ case 219:
+#line 2207 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Perhaps it's an FP constant?
+ (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 220:
+#line 2211 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue());
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 221:
+#line 2215 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse());
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 222:
+#line 2219 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ValIDVal) = ValID::createNull();
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 223:
+#line 2223 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ValIDVal) = ValID::createUndef();
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 224:
+#line 2227 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // A vector zero constant.
+ (yyval.ValIDVal) = ValID::createZeroInit();
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 225:
+#line 2231 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Nonempty unsized packed vector
+ const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType();
+ int NumElements = (yyvsp[-1].ConstVector)->size();
- PackedType* pt = PackedType::get(ETy, NumElements);
+ VectorType* pt = VectorType::get(ETy, NumElements);
PATypeHolder* PTy = new PATypeHolder(
HandleUpRefs(
- PackedType::get(
+ VectorType::get(
ETy,
NumElements)
)
);
// Verify all elements are correct type!
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- if (ETy != (*yyvsp[-1].ConstVector)[i]->getType())
+ for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) {
+ if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType())
GEN_ERROR("Element #" + utostr(i) + " is not of type '" +
ETy->getDescription() +"' as required!\nIt is of type '" +
- (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'.");
+ (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'.");
}
- yyval.ValIDVal = ValID::create(ConstantPacked::get(pt, *yyvsp[-1].ConstVector));
- delete PTy; delete yyvsp[-1].ConstVector;
+ (yyval.ValIDVal) = ValID::create(ConstantVector::get(pt, *(yyvsp[-1].ConstVector)));
+ delete PTy; delete (yyvsp[-1].ConstVector);
CHECK_FOR_ERROR
- ;
- break;}
-case 225:
-#line 2256 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal);
+ ;}
+ break;
+
+ case 226:
+#line 2256 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 226:
-#line 2260 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- char *End = UnEscapeLexed(yyvsp[-2].StrVal, true);
- std::string AsmStr = std::string(yyvsp[-2].StrVal, End);
- End = UnEscapeLexed(yyvsp[0].StrVal, true);
- std::string Constraints = std::string(yyvsp[0].StrVal, End);
- yyval.ValIDVal = ValID::createInlineAsm(AsmStr, Constraints, yyvsp[-3].BoolVal);
- free(yyvsp[-2].StrVal);
- free(yyvsp[0].StrVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 227:
-#line 2274 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Is it an integer reference...?
- yyval.ValIDVal = ValID::createLocalID(yyvsp[0].UIntVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 228:
-#line 2278 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ValIDVal = ValID::createGlobalID(yyvsp[0].UIntVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 229:
-#line 2282 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Is it a named reference...?
- yyval.ValIDVal = ValID::createLocalName(yyvsp[0].StrVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 230:
-#line 2286 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Is it a named reference...?
- yyval.ValIDVal = ValID::createGlobalName(yyvsp[0].StrVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 233:
-#line 2298 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 227:
+#line 2260 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ char *End = UnEscapeLexed((yyvsp[-2].StrVal), true);
+ std::string AsmStr = std::string((yyvsp[-2].StrVal), End);
+ End = UnEscapeLexed((yyvsp[0].StrVal), true);
+ std::string Constraints = std::string((yyvsp[0].StrVal), End);
+ (yyval.ValIDVal) = ValID::createInlineAsm(AsmStr, Constraints, (yyvsp[-3].BoolVal));
+ free((yyvsp[-2].StrVal));
+ free((yyvsp[0].StrVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 228:
+#line 2274 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Is it an integer reference...?
+ (yyval.ValIDVal) = ValID::createLocalID((yyvsp[0].UIntVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 229:
+#line 2278 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[0].UIntVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 230:
+#line 2282 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Is it a named reference...?
+ (yyval.ValIDVal) = ValID::createLocalName((yyvsp[0].StrVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 231:
+#line 2286 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Is it a named reference...?
+ (yyval.ValIDVal) = ValID::createGlobalName((yyvsp[0].StrVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 234:
+#line 2298 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal);
- delete yyvsp[-1].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 234:
-#line 2307 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 235:
-#line 2311 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Do not allow functions with 0 basic blocks
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 236:
-#line 2320 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal);
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ (yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal));
+ delete (yyvsp[-1].TypeVal);
CHECK_FOR_ERROR
- InsertValue(yyvsp[0].TermInstVal);
- yyvsp[-2].BasicBlockVal->getInstList().push_back(yyvsp[0].TermInstVal);
- InsertValue(yyvsp[-2].BasicBlockVal);
- yyval.BasicBlockVal = yyvsp[-2].BasicBlockVal;
+ ;}
+ break;
+
+ case 235:
+#line 2307 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 237:
-#line 2330 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (CastInst *CI1 = dyn_cast<CastInst>(yyvsp[0].InstVal))
+ ;}
+ break;
+
+ case 236:
+#line 2311 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Do not allow functions with 0 basic blocks
+ (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 237:
+#line 2320 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal));
+ CHECK_FOR_ERROR
+ InsertValue((yyvsp[0].TermInstVal));
+ (yyvsp[-2].BasicBlockVal)->getInstList().push_back((yyvsp[0].TermInstVal));
+ InsertValue((yyvsp[-2].BasicBlockVal));
+ (yyval.BasicBlockVal) = (yyvsp[-2].BasicBlockVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 238:
+#line 2330 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (CastInst *CI1 = dyn_cast<CastInst>((yyvsp[0].InstVal)))
if (CastInst *CI2 = dyn_cast<CastInst>(CI1->getOperand(0)))
if (CI2->getParent() == 0)
- yyvsp[-1].BasicBlockVal->getInstList().push_back(CI2);
- yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal);
- yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 238:
-#line 2339 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.BasicBlockVal = getBBVal(ValID::createLocalID(CurFun.NextBBNum++), true);
+ (yyvsp[-1].BasicBlockVal)->getInstList().push_back(CI2);
+ (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal));
+ (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 239:
+#line 2339 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.BasicBlockVal) = getBBVal(ValID::createLocalID(CurFun.NextBBNum++), true);
CHECK_FOR_ERROR
// Make sure to move the basic block to the correct location in the
@@ -4092,14 +4896,15 @@ case 238:
// referenced.
Function::BasicBlockListType &BBL =
CurFun.CurrentFunction->getBasicBlockList();
- BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal);
+ BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 239:
-#line 2351 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.BasicBlockVal = getBBVal(ValID::createLocalName(yyvsp[0].StrVal), true);
+ ;}
+ break;
+
+ case 240:
+#line 2351 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.BasicBlockVal) = getBBVal(ValID::createLocalName((yyvsp[0].StrVal)), true);
CHECK_FOR_ERROR
// Make sure to move the basic block to the correct location in the
@@ -4107,93 +4912,100 @@ case 239:
// referenced.
Function::BasicBlockListType &BBL =
CurFun.CurrentFunction->getBasicBlockList();
- BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 240:
-#line 2364 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Return with a result...
- yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal);
- CHECK_FOR_ERROR
- ;
- break;}
-case 241:
-#line 2368 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Return with no result...
- yyval.TermInstVal = new ReturnInst();
- CHECK_FOR_ERROR
- ;
- break;}
-case 242:
-#line 2372 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Unconditional Branch...
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
- CHECK_FOR_ERROR
- yyval.TermInstVal = new BranchInst(tmpBB);
- ;
- break;}
-case 243:
-#line 2377 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- assert(cast<IntegerType>(yyvsp[-7].PrimType)->getBitWidth() == 1 && "Not Bool?");
- BasicBlock* tmpBBA = getBBVal(yyvsp[-3].ValIDVal);
- CHECK_FOR_ERROR
- BasicBlock* tmpBBB = getBBVal(yyvsp[0].ValIDVal);
- CHECK_FOR_ERROR
- Value* tmpVal = getVal(Type::Int1Ty, yyvsp[-6].ValIDVal);
- CHECK_FOR_ERROR
- yyval.TermInstVal = new BranchInst(tmpBBA, tmpBBB, tmpVal);
- ;
- break;}
-case 244:
-#line 2387 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- Value* tmpVal = getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal);
+ BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 241:
+#line 2364 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Return with a result...
+ (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal));
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 242:
+#line 2368 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Return with no result...
+ (yyval.TermInstVal) = new ReturnInst();
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 243:
+#line 2372 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Unconditional Branch...
+ BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
+ CHECK_FOR_ERROR
+ (yyval.TermInstVal) = new BranchInst(tmpBB);
+ ;}
+ break;
+
+ case 244:
+#line 2377 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ assert(cast<IntegerType>((yyvsp[-7].PrimType))->getBitWidth() == 1 && "Not Bool?");
+ BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal));
+ CHECK_FOR_ERROR
+ BasicBlock* tmpBBB = getBBVal((yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
- BasicBlock* tmpBB = getBBVal(yyvsp[-3].ValIDVal);
+ Value* tmpVal = getVal(Type::Int1Ty, (yyvsp[-6].ValIDVal));
CHECK_FOR_ERROR
- SwitchInst *S = new SwitchInst(tmpVal, tmpBB, yyvsp[-1].JumpTable->size());
- yyval.TermInstVal = S;
+ (yyval.TermInstVal) = new BranchInst(tmpBBA, tmpBBB, tmpVal);
+ ;}
+ break;
+
+ case 245:
+#line 2387 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal));
+ CHECK_FOR_ERROR
+ BasicBlock* tmpBB = getBBVal((yyvsp[-3].ValIDVal));
+ CHECK_FOR_ERROR
+ SwitchInst *S = new SwitchInst(tmpVal, tmpBB, (yyvsp[-1].JumpTable)->size());
+ (yyval.TermInstVal) = S;
- std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = yyvsp[-1].JumpTable->begin(),
- E = yyvsp[-1].JumpTable->end();
+ std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = (yyvsp[-1].JumpTable)->begin(),
+ E = (yyvsp[-1].JumpTable)->end();
for (; I != E; ++I) {
if (ConstantInt *CI = dyn_cast<ConstantInt>(I->first))
S->addCase(CI, I->second);
else
GEN_ERROR("Switch case is constant, but not a simple integer");
}
- delete yyvsp[-1].JumpTable;
+ delete (yyvsp[-1].JumpTable);
CHECK_FOR_ERROR
- ;
- break;}
-case 245:
-#line 2406 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- Value* tmpVal = getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal);
+ ;}
+ break;
+
+ case 246:
+#line 2406 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal));
CHECK_FOR_ERROR
- BasicBlock* tmpBB = getBBVal(yyvsp[-2].ValIDVal);
+ BasicBlock* tmpBB = getBBVal((yyvsp[-2].ValIDVal));
CHECK_FOR_ERROR
SwitchInst *S = new SwitchInst(tmpVal, tmpBB, 0);
- yyval.TermInstVal = S;
+ (yyval.TermInstVal) = S;
CHECK_FOR_ERROR
- ;
- break;}
-case 246:
-#line 2416 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 247:
+#line 2416 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
// Handle the short syntax
const PointerType *PFTy = 0;
const FunctionType *Ty = 0;
- if (!(PFTy = dyn_cast<PointerType>(yyvsp[-11].TypeVal->get())) ||
+ if (!(PFTy = dyn_cast<PointerType>((yyvsp[-11].TypeVal)->get())) ||
!(Ty = dyn_cast<FunctionType>(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector<const Type*> ParamTypes;
FunctionType::ParamAttrsList ParamAttrs;
- ParamAttrs.push_back(yyvsp[-6].ParamAttrs);
- for (ValueRefList::iterator I = yyvsp[-8].ValueRefList->begin(), E = yyvsp[-8].ValueRefList->end(); I != E; ++I) {
+ ParamAttrs.push_back((yyvsp[-6].ParamAttrs));
+ for (ValueRefList::iterator I = (yyvsp[-8].ValueRefList)->begin(), E = (yyvsp[-8].ValueRefList)->end(); I != E; ++I) {
const Type *Ty = I->Val->getType();
if (Ty == Type::VoidTy)
GEN_ERROR("Short call syntax cannot be used with varargs");
@@ -4201,20 +5013,20 @@ case 246:
ParamAttrs.push_back(I->Attrs);
}
- Ty = FunctionType::get(yyvsp[-11].TypeVal->get(), ParamTypes, false, ParamAttrs);
+ Ty = FunctionType::get((yyvsp[-11].TypeVal)->get(), ParamTypes, false, ParamAttrs);
PFTy = PointerType::get(Ty);
}
- Value *V = getVal(PFTy, yyvsp[-10].ValIDVal); // Get the function we're calling...
+ Value *V = getVal(PFTy, (yyvsp[-10].ValIDVal)); // Get the function we're calling...
CHECK_FOR_ERROR
- BasicBlock *Normal = getBBVal(yyvsp[-3].ValIDVal);
+ BasicBlock *Normal = getBBVal((yyvsp[-3].ValIDVal));
CHECK_FOR_ERROR
- BasicBlock *Except = getBBVal(yyvsp[0].ValIDVal);
+ BasicBlock *Except = getBBVal((yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
// Check the arguments
ValueList Args;
- if (yyvsp[-8].ValueRefList->empty()) { // Has no arguments?
+ if ((yyvsp[-8].ValueRefList)->empty()) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
GEN_ERROR("No arguments passed to a function that "
@@ -4224,7 +5036,7 @@ case 246:
// correctly!
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- ValueRefList::iterator ArgI = yyvsp[-8].ValueRefList->begin(), ArgE = yyvsp[-8].ValueRefList->end();
+ ValueRefList::iterator ArgI = (yyvsp[-8].ValueRefList)->begin(), ArgE = (yyvsp[-8].ValueRefList)->end();
for (; ArgI != ArgE && I != E; ++ArgI, ++I) {
if (ArgI->Val->getType() != *I)
@@ -4243,314 +5055,340 @@ case 246:
// Create the InvokeInst
InvokeInst *II = new InvokeInst(V, Normal, Except, &Args[0], Args.size());
- II->setCallingConv(yyvsp[-12].UIntVal);
- yyval.TermInstVal = II;
- delete yyvsp[-8].ValueRefList;
- CHECK_FOR_ERROR
- ;
- break;}
-case 247:
-#line 2482 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TermInstVal = new UnwindInst();
+ II->setCallingConv((yyvsp[-12].UIntVal));
+ (yyval.TermInstVal) = II;
+ delete (yyvsp[-8].ValueRefList);
CHECK_FOR_ERROR
- ;
- break;}
-case 248:
-#line 2486 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.TermInstVal = new UnreachableInst();
+ ;}
+ break;
+
+ case 248:
+#line 2482 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TermInstVal) = new UnwindInst();
CHECK_FOR_ERROR
- ;
- break;}
-case 249:
-#line 2493 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.JumpTable = yyvsp[-5].JumpTable;
- Constant *V = cast<Constant>(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal));
+ ;}
+ break;
+
+ case 249:
+#line 2486 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.TermInstVal) = new UnreachableInst();
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 250:
+#line 2493 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.JumpTable) = (yyvsp[-5].JumpTable);
+ Constant *V = cast<Constant>(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal)));
CHECK_FOR_ERROR
if (V == 0)
GEN_ERROR("May only switch on a constant pool value");
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
+ BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
- yyval.JumpTable->push_back(std::make_pair(V, tmpBB));
- ;
- break;}
-case 250:
-#line 2504 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.JumpTable = new std::vector<std::pair<Constant*, BasicBlock*> >();
- Constant *V = cast<Constant>(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal));
+ (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB));
+ ;}
+ break;
+
+ case 251:
+#line 2504 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.JumpTable) = new std::vector<std::pair<Constant*, BasicBlock*> >();
+ Constant *V = cast<Constant>(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal)));
CHECK_FOR_ERROR
if (V == 0)
GEN_ERROR("May only switch on a constant pool value");
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
+ BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
- yyval.JumpTable->push_back(std::make_pair(V, tmpBB));
- ;
- break;}
-case 251:
-#line 2517 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB));
+ ;}
+ break;
+
+ case 252:
+#line 2517 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
// Is this definition named?? if so, assign the name...
- setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal);
+ setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal));
CHECK_FOR_ERROR
- InsertValue(yyvsp[0].InstVal);
- yyval.InstVal = yyvsp[0].InstVal;
+ InsertValue((yyvsp[0].InstVal));
+ (yyval.InstVal) = (yyvsp[0].InstVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 252:
-#line 2527 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Used for PHI nodes
+ ;}
+ break;
+
+ case 253:
+#line 2527 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { // Used for PHI nodes
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-5].TypeVal)->getDescription());
- yyval.PHIList = new std::list<std::pair<Value*, BasicBlock*> >();
- Value* tmpVal = getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal);
- CHECK_FOR_ERROR
- BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal);
- CHECK_FOR_ERROR
- yyval.PHIList->push_back(std::make_pair(tmpVal, tmpBB));
- delete yyvsp[-5].TypeVal;
- ;
- break;}
-case 253:
-#line 2538 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.PHIList = yyvsp[-6].PHIList;
- Value* tmpVal = getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal);
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-5].TypeVal))->getDescription());
+ (yyval.PHIList) = new std::list<std::pair<Value*, BasicBlock*> >();
+ Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal));
CHECK_FOR_ERROR
- BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal);
+ BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal));
CHECK_FOR_ERROR
- yyvsp[-6].PHIList->push_back(std::make_pair(tmpVal, tmpBB));
- ;
- break;}
-case 254:
-#line 2548 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ (yyval.PHIList)->push_back(std::make_pair(tmpVal, tmpBB));
+ delete (yyvsp[-5].TypeVal);
+ ;}
+ break;
+
+ case 254:
+#line 2538 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.PHIList) = (yyvsp[-6].PHIList);
+ Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal));
+ CHECK_FOR_ERROR
+ BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal));
+ CHECK_FOR_ERROR
+ (yyvsp[-6].PHIList)->push_back(std::make_pair(tmpVal, tmpBB));
+ ;}
+ break;
+
+ case 255:
+#line 2548 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
// Used for call and invoke instructions
- yyval.ValueRefList = new ValueRefList();
- ValueRefListEntry E; E.Attrs = yyvsp[0].ParamAttrs; E.Val = getVal(yyvsp[-2].TypeVal->get(), yyvsp[-1].ValIDVal);
- yyval.ValueRefList->push_back(E);
- ;
- break;}
-case 255:
-#line 2556 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ (yyval.ValueRefList) = new ValueRefList();
+ ValueRefListEntry E; E.Attrs = (yyvsp[0].ParamAttrs); E.Val = getVal((yyvsp[-2].TypeVal)->get(), (yyvsp[-1].ValIDVal));
+ (yyval.ValueRefList)->push_back(E);
+ ;}
+ break;
+
+ case 256:
+#line 2556 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
- yyval.ValueRefList = yyvsp[-4].ValueRefList;
- ValueRefListEntry E; E.Attrs = yyvsp[0].ParamAttrs; E.Val = getVal(yyvsp[-2].TypeVal->get(), yyvsp[-1].ValIDVal);
- yyval.ValueRefList->push_back(E);
- CHECK_FOR_ERROR
- ;
- break;}
-case 256:
-#line 2564 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ValueRefList = new ValueRefList(); ;
- break;}
-case 257:
-#line 2567 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{ yyval.ValueList = new std::vector<Value*>(); ;
- break;}
-case 258:
-#line 2568 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.ValueList = yyvsp[-2].ValueList;
- yyval.ValueList->push_back(yyvsp[0].ValueVal);
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
+ (yyval.ValueRefList) = (yyvsp[-4].ValueRefList);
+ ValueRefListEntry E; E.Attrs = (yyvsp[0].ParamAttrs); E.Val = getVal((yyvsp[-2].TypeVal)->get(), (yyvsp[-1].ValIDVal));
+ (yyval.ValueRefList)->push_back(E);
CHECK_FOR_ERROR
- ;
- break;}
-case 259:
-#line 2575 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.BoolVal = true;
+ ;}
+ break;
+
+ case 257:
+#line 2564 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ValueRefList) = new ValueRefList(); ;}
+ break;
+
+ case 258:
+#line 2567 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ { (yyval.ValueList) = new std::vector<Value*>(); ;}
+ break;
+
+ case 259:
+#line 2568 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.ValueList) = (yyvsp[-2].ValueList);
+ (yyval.ValueList)->push_back((yyvsp[0].ValueVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 260:
-#line 2579 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.BoolVal = false;
+ ;}
+ break;
+
+ case 260:
+#line 2575 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.BoolVal) = true;
CHECK_FOR_ERROR
- ;
- break;}
-case 261:
-#line 2584 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 261:
+#line 2579 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.BoolVal) = false;
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 262:
+#line 2584 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
- if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() &&
- !isa<PackedType>((*yyvsp[-3].TypeVal).get()))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
+ if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() &&
+ !isa<VectorType>((*(yyvsp[-3].TypeVal)).get()))
GEN_ERROR(
"Arithmetic operator requires integer, FP, or packed operands");
- if (isa<PackedType>((*yyvsp[-3].TypeVal).get()) &&
- (yyvsp[-4].BinaryOpVal == Instruction::URem ||
- yyvsp[-4].BinaryOpVal == Instruction::SRem ||
- yyvsp[-4].BinaryOpVal == Instruction::FRem))
+ if (isa<VectorType>((*(yyvsp[-3].TypeVal)).get()) &&
+ ((yyvsp[-4].BinaryOpVal) == Instruction::URem ||
+ (yyvsp[-4].BinaryOpVal) == Instruction::SRem ||
+ (yyvsp[-4].BinaryOpVal) == Instruction::FRem))
GEN_ERROR("Remainder not supported on packed types");
- Value* val1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal);
+ Value* val1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal));
CHECK_FOR_ERROR
- Value* val2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal);
+ Value* val2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
- yyval.InstVal = BinaryOperator::create(yyvsp[-4].BinaryOpVal, val1, val2);
- if (yyval.InstVal == 0)
+ (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), val1, val2);
+ if ((yyval.InstVal) == 0)
GEN_ERROR("binary operator returned null");
- delete yyvsp[-3].TypeVal;
- ;
- break;}
-case 262:
-#line 2605 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ delete (yyvsp[-3].TypeVal);
+ ;}
+ break;
+
+ case 263:
+#line 2605 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
- if (!(*yyvsp[-3].TypeVal)->isInteger()) {
- if (Instruction::isShift(yyvsp[-4].BinaryOpVal) || !isa<PackedType>(yyvsp[-3].TypeVal->get()) ||
- !cast<PackedType>(yyvsp[-3].TypeVal->get())->getElementType()->isInteger())
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
+ if (!(*(yyvsp[-3].TypeVal))->isInteger()) {
+ if (Instruction::isShift((yyvsp[-4].BinaryOpVal)) || !isa<VectorType>((yyvsp[-3].TypeVal)->get()) ||
+ !cast<VectorType>((yyvsp[-3].TypeVal)->get())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands");
}
- Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal);
+ Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal));
CHECK_FOR_ERROR
- Value* tmpVal2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal);
+ Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
- yyval.InstVal = BinaryOperator::create(yyvsp[-4].BinaryOpVal, tmpVal1, tmpVal2);
- if (yyval.InstVal == 0)
+ (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2);
+ if ((yyval.InstVal) == 0)
GEN_ERROR("binary operator returned null");
- delete yyvsp[-3].TypeVal;
- ;
- break;}
-case 263:
-#line 2622 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ delete (yyvsp[-3].TypeVal);
+ ;}
+ break;
+
+ case 264:
+#line 2622 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
- if (isa<PackedType>((*yyvsp[-3].TypeVal).get()))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
+ if (isa<VectorType>((*(yyvsp[-3].TypeVal)).get()))
GEN_ERROR("Packed types not supported by icmp instruction");
- Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal);
+ Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal));
CHECK_FOR_ERROR
- Value* tmpVal2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal);
+ Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
- yyval.InstVal = CmpInst::create(yyvsp[-5].OtherOpVal, yyvsp[-4].IPredicate, tmpVal1, tmpVal2);
- if (yyval.InstVal == 0)
+ (yyval.InstVal) = CmpInst::create((yyvsp[-5].OtherOpVal), (yyvsp[-4].IPredicate), tmpVal1, tmpVal2);
+ if ((yyval.InstVal) == 0)
GEN_ERROR("icmp operator returned null");
- ;
- break;}
-case 264:
-#line 2635 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 265:
+#line 2635 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
- if (isa<PackedType>((*yyvsp[-3].TypeVal).get()))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
+ if (isa<VectorType>((*(yyvsp[-3].TypeVal)).get()))
GEN_ERROR("Packed types not supported by fcmp instruction");
- Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal);
+ Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal));
CHECK_FOR_ERROR
- Value* tmpVal2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal);
+ Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
- yyval.InstVal = CmpInst::create(yyvsp[-5].OtherOpVal, yyvsp[-4].FPredicate, tmpVal1, tmpVal2);
- if (yyval.InstVal == 0)
+ (yyval.InstVal) = CmpInst::create((yyvsp[-5].OtherOpVal), (yyvsp[-4].FPredicate), tmpVal1, tmpVal2);
+ if ((yyval.InstVal) == 0)
GEN_ERROR("fcmp operator returned null");
- ;
- break;}
-case 265:
-#line 2648 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 266:
+#line 2648 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
- Value* Val = yyvsp[-2].ValueVal;
- const Type* DestTy = yyvsp[0].TypeVal->get();
- if (!CastInst::castIsValid(yyvsp[-3].CastOpVal, Val, DestTy))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
+ Value* Val = (yyvsp[-2].ValueVal);
+ const Type* DestTy = (yyvsp[0].TypeVal)->get();
+ if (!CastInst::castIsValid((yyvsp[-3].CastOpVal), Val, DestTy))
GEN_ERROR("invalid cast opcode for cast from '" +
Val->getType()->getDescription() + "' to '" +
DestTy->getDescription() + "'");
- yyval.InstVal = CastInst::create(yyvsp[-3].CastOpVal, Val, DestTy);
- delete yyvsp[0].TypeVal;
- ;
- break;}
-case 266:
-#line 2660 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (yyvsp[-4].ValueVal->getType() != Type::Int1Ty)
+ (yyval.InstVal) = CastInst::create((yyvsp[-3].CastOpVal), Val, DestTy);
+ delete (yyvsp[0].TypeVal);
+ ;}
+ break;
+
+ case 267:
+#line 2660 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if ((yyvsp[-4].ValueVal)->getType() != Type::Int1Ty)
GEN_ERROR("select condition must be boolean");
- if (yyvsp[-2].ValueVal->getType() != yyvsp[0].ValueVal->getType())
+ if ((yyvsp[-2].ValueVal)->getType() != (yyvsp[0].ValueVal)->getType())
GEN_ERROR("select value types should match");
- yyval.InstVal = new SelectInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal);
+ (yyval.InstVal) = new SelectInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 267:
-#line 2668 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 268:
+#line 2668 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
- yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal);
- delete yyvsp[0].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 268:
-#line 2675 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (!ExtractElementInst::isValidOperands(yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
+ (yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal));
+ delete (yyvsp[0].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 269:
+#line 2675 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
GEN_ERROR("Invalid extractelement operands");
- yyval.InstVal = new ExtractElementInst(yyvsp[-2].ValueVal, yyvsp[0].ValueVal);
+ (yyval.InstVal) = new ExtractElementInst((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 269:
-#line 2681 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (!InsertElementInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
+ ;}
+ break;
+
+ case 270:
+#line 2681 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
GEN_ERROR("Invalid insertelement operands");
- yyval.InstVal = new InsertElementInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal);
+ (yyval.InstVal) = new InsertElementInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 270:
-#line 2687 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (!ShuffleVectorInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
+ ;}
+ break;
+
+ case 271:
+#line 2687 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
GEN_ERROR("Invalid shufflevector operands");
- yyval.InstVal = new ShuffleVectorInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal);
+ (yyval.InstVal) = new ShuffleVectorInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 271:
-#line 2693 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- const Type *Ty = yyvsp[0].PHIList->front().first->getType();
+ ;}
+ break;
+
+ case 272:
+#line 2693 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ const Type *Ty = (yyvsp[0].PHIList)->front().first->getType();
if (!Ty->isFirstClassType())
GEN_ERROR("PHI node operands must be of first class type");
- yyval.InstVal = new PHINode(Ty);
- ((PHINode*)yyval.InstVal)->reserveOperandSpace(yyvsp[0].PHIList->size());
- while (yyvsp[0].PHIList->begin() != yyvsp[0].PHIList->end()) {
- if (yyvsp[0].PHIList->front().first->getType() != Ty)
+ (yyval.InstVal) = new PHINode(Ty);
+ ((PHINode*)(yyval.InstVal))->reserveOperandSpace((yyvsp[0].PHIList)->size());
+ while ((yyvsp[0].PHIList)->begin() != (yyvsp[0].PHIList)->end()) {
+ if ((yyvsp[0].PHIList)->front().first->getType() != Ty)
GEN_ERROR("All elements of a PHI node must be of the same type");
- cast<PHINode>(yyval.InstVal)->addIncoming(yyvsp[0].PHIList->front().first, yyvsp[0].PHIList->front().second);
- yyvsp[0].PHIList->pop_front();
+ cast<PHINode>((yyval.InstVal))->addIncoming((yyvsp[0].PHIList)->front().first, (yyvsp[0].PHIList)->front().second);
+ (yyvsp[0].PHIList)->pop_front();
}
- delete yyvsp[0].PHIList; // Free the list...
+ delete (yyvsp[0].PHIList); // Free the list...
CHECK_FOR_ERROR
- ;
- break;}
-case 272:
-#line 2709 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 273:
+#line 2709 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
// Handle the short syntax
const PointerType *PFTy = 0;
const FunctionType *Ty = 0;
- if (!(PFTy = dyn_cast<PointerType>(yyvsp[-5].TypeVal->get())) ||
+ if (!(PFTy = dyn_cast<PointerType>((yyvsp[-5].TypeVal)->get())) ||
!(Ty = dyn_cast<FunctionType>(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector<const Type*> ParamTypes;
FunctionType::ParamAttrsList ParamAttrs;
- ParamAttrs.push_back(yyvsp[0].ParamAttrs);
- for (ValueRefList::iterator I = yyvsp[-2].ValueRefList->begin(), E = yyvsp[-2].ValueRefList->end(); I != E; ++I) {
+ ParamAttrs.push_back((yyvsp[0].ParamAttrs));
+ for (ValueRefList::iterator I = (yyvsp[-2].ValueRefList)->begin(), E = (yyvsp[-2].ValueRefList)->end(); I != E; ++I) {
const Type *Ty = I->Val->getType();
if (Ty == Type::VoidTy)
GEN_ERROR("Short call syntax cannot be used with varargs");
@@ -4558,16 +5396,16 @@ case 272:
ParamAttrs.push_back(I->Attrs);
}
- Ty = FunctionType::get(yyvsp[-5].TypeVal->get(), ParamTypes, false, ParamAttrs);
+ Ty = FunctionType::get((yyvsp[-5].TypeVal)->get(), ParamTypes, false, ParamAttrs);
PFTy = PointerType::get(Ty);
}
- Value *V = getVal(PFTy, yyvsp[-4].ValIDVal); // Get the function we're calling...
+ Value *V = getVal(PFTy, (yyvsp[-4].ValIDVal)); // Get the function we're calling...
CHECK_FOR_ERROR
// Check the arguments
ValueList Args;
- if (yyvsp[-2].ValueRefList->empty()) { // Has no arguments?
+ if ((yyvsp[-2].ValueRefList)->empty()) { // Has no arguments?
// Make sure no arguments is a good thing!
if (Ty->getNumParams() != 0)
GEN_ERROR("No arguments passed to a function that "
@@ -4578,7 +5416,7 @@ case 272:
//
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- ValueRefList::iterator ArgI = yyvsp[-2].ValueRefList->begin(), ArgE = yyvsp[-2].ValueRefList->end();
+ ValueRefList::iterator ArgI = (yyvsp[-2].ValueRefList)->begin(), ArgE = (yyvsp[-2].ValueRefList)->end();
for (; ArgI != ArgE && I != E; ++ArgI, ++I) {
if (ArgI->Val->getType() != *I)
@@ -4595,365 +5433,428 @@ case 272:
}
// Create the call node
CallInst *CI = new CallInst(V, &Args[0], Args.size());
- CI->setTailCall(yyvsp[-7].BoolVal);
- CI->setCallingConv(yyvsp[-6].UIntVal);
- yyval.InstVal = CI;
- delete yyvsp[-2].ValueRefList;
- delete yyvsp[-5].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 273:
-#line 2772 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.InstVal = yyvsp[0].InstVal;
+ CI->setTailCall((yyvsp[-7].BoolVal));
+ CI->setCallingConv((yyvsp[-6].UIntVal));
+ (yyval.InstVal) = CI;
+ delete (yyvsp[-2].ValueRefList);
+ delete (yyvsp[-5].TypeVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 274:
-#line 2777 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.BoolVal = true;
+ ;}
+ break;
+
+ case 274:
+#line 2772 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.InstVal) = (yyvsp[0].InstVal);
CHECK_FOR_ERROR
- ;
- break;}
-case 275:
-#line 2781 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- yyval.BoolVal = false;
+ ;}
+ break;
+
+ case 275:
+#line 2777 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.BoolVal) = true;
CHECK_FOR_ERROR
- ;
- break;}
-case 276:
-#line 2788 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 276:
+#line 2781 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ (yyval.BoolVal) = false;
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 277:
+#line 2788 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- yyval.InstVal = new MallocInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal);
- delete yyvsp[-1].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 277:
-#line 2795 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ (yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal));
+ delete (yyvsp[-1].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 278:
+#line 2795 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription());
- Value* tmpVal = getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal);
- CHECK_FOR_ERROR
- yyval.InstVal = new MallocInst(*yyvsp[-4].TypeVal, tmpVal, yyvsp[0].UIntVal);
- delete yyvsp[-4].TypeVal;
- ;
- break;}
-case 278:
-#line 2803 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription());
+ Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal));
+ CHECK_FOR_ERROR
+ (yyval.InstVal) = new MallocInst(*(yyvsp[-4].TypeVal), tmpVal, (yyvsp[0].UIntVal));
+ delete (yyvsp[-4].TypeVal);
+ ;}
+ break;
+
+ case 279:
+#line 2803 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- yyval.InstVal = new AllocaInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal);
- delete yyvsp[-1].TypeVal;
- CHECK_FOR_ERROR
- ;
- break;}
-case 279:
-#line 2810 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ (yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal));
+ delete (yyvsp[-1].TypeVal);
+ CHECK_FOR_ERROR
+ ;}
+ break;
+
+ case 280:
+#line 2810 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription());
- Value* tmpVal = getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal);
- CHECK_FOR_ERROR
- yyval.InstVal = new AllocaInst(*yyvsp[-4].TypeVal, tmpVal, yyvsp[0].UIntVal);
- delete yyvsp[-4].TypeVal;
- ;
- break;}
-case 280:
-#line 2818 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
- if (!isa<PointerType>(yyvsp[0].ValueVal->getType()))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription());
+ Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal));
+ CHECK_FOR_ERROR
+ (yyval.InstVal) = new AllocaInst(*(yyvsp[-4].TypeVal), tmpVal, (yyvsp[0].UIntVal));
+ delete (yyvsp[-4].TypeVal);
+ ;}
+ break;
+
+ case 281:
+#line 2818 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
+ if (!isa<PointerType>((yyvsp[0].ValueVal)->getType()))
GEN_ERROR("Trying to free nonpointer type " +
- yyvsp[0].ValueVal->getType()->getDescription() + "");
- yyval.InstVal = new FreeInst(yyvsp[0].ValueVal);
+ (yyvsp[0].ValueVal)->getType()->getDescription() + "");
+ (yyval.InstVal) = new FreeInst((yyvsp[0].ValueVal));
CHECK_FOR_ERROR
- ;
- break;}
-case 281:
-#line 2826 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ ;}
+ break;
+
+ case 282:
+#line 2826 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- if (!isa<PointerType>(yyvsp[-1].TypeVal->get()))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ if (!isa<PointerType>((yyvsp[-1].TypeVal)->get()))
GEN_ERROR("Can't load from nonpointer type: " +
- (*yyvsp[-1].TypeVal)->getDescription());
- if (!cast<PointerType>(yyvsp[-1].TypeVal->get())->getElementType()->isFirstClassType())
+ (*(yyvsp[-1].TypeVal))->getDescription());
+ if (!cast<PointerType>((yyvsp[-1].TypeVal)->get())->getElementType()->isFirstClassType())
GEN_ERROR("Can't load from pointer of non-first-class type: " +
- (*yyvsp[-1].TypeVal)->getDescription());
- Value* tmpVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal);
- CHECK_FOR_ERROR
- yyval.InstVal = new LoadInst(tmpVal, "", yyvsp[-3].BoolVal);
- delete yyvsp[-1].TypeVal;
- ;
- break;}
-case 282:
-#line 2840 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ (*(yyvsp[-1].TypeVal))->getDescription());
+ Value* tmpVal = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal));
+ CHECK_FOR_ERROR
+ (yyval.InstVal) = new LoadInst(tmpVal, "", (yyvsp[-3].BoolVal));
+ delete (yyvsp[-1].TypeVal);
+ ;}
+ break;
+
+ case 283:
+#line 2840 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
- const PointerType *PT = dyn_cast<PointerType>(yyvsp[-1].TypeVal->get());
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
+ const PointerType *PT = dyn_cast<PointerType>((yyvsp[-1].TypeVal)->get());
if (!PT)
GEN_ERROR("Can't store to a nonpointer type: " +
- (*yyvsp[-1].TypeVal)->getDescription());
+ (*(yyvsp[-1].TypeVal))->getDescription());
const Type *ElTy = PT->getElementType();
- if (ElTy != yyvsp[-3].ValueVal->getType())
- GEN_ERROR("Can't store '" + yyvsp[-3].ValueVal->getType()->getDescription() +
+ if (ElTy != (yyvsp[-3].ValueVal)->getType())
+ GEN_ERROR("Can't store '" + (yyvsp[-3].ValueVal)->getType()->getDescription() +
"' into space of type '" + ElTy->getDescription() + "'");
- Value* tmpVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal);
+ Value* tmpVal = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
- yyval.InstVal = new StoreInst(yyvsp[-3].ValueVal, tmpVal, yyvsp[-5].BoolVal);
- delete yyvsp[-1].TypeVal;
- ;
- break;}
-case 283:
-#line 2857 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
-{
+ (yyval.InstVal) = new StoreInst((yyvsp[-3].ValueVal), tmpVal, (yyvsp[-5].BoolVal));
+ delete (yyvsp[-1].TypeVal);
+ ;}
+ break;
+
+ case 284:
+#line 2857 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+ {
if (!UpRefs.empty())
- GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
- if (!isa<PointerType>(yyvsp[-2].TypeVal->get()))
+ GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
+ if (!isa<PointerType>((yyvsp[-2].TypeVal)->get()))
GEN_ERROR("getelementptr insn requires pointer operand");
- if (!GetElementPtrInst::getIndexedType(*yyvsp[-2].TypeVal, &(*yyvsp[0].ValueList)[0], yyvsp[0].ValueList->size(), true))
+ if (!GetElementPtrInst::getIndexedType(*(yyvsp[-2].TypeVal), &(*(yyvsp[0].ValueList))[0], (yyvsp[0].ValueList)->size(), true))
GEN_ERROR("Invalid getelementptr indices for type '" +
- (*yyvsp[-2].TypeVal)->getDescription()+ "'");
- Value* tmpVal = getVal(*yyvsp[-2].TypeVal, yyvsp[-1].ValIDVal);
- CHECK_FOR_ERROR
- yyval.InstVal = new GetElementPtrInst(tmpVal, &(*yyvsp[0].ValueList)[0], yyvsp[0].ValueList->size());
- delete yyvsp[-2].TypeVal;
- delete yyvsp[0].ValueList;
- ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/share/bison.simple"
+ (*(yyvsp[-2].TypeVal))->getDescription()+ "'");
+ Value* tmpVal = getVal(*(yyvsp[-2].TypeVal), (yyvsp[-1].ValIDVal));
+ CHECK_FOR_ERROR
+ (yyval.InstVal) = new GetElementPtrInst(tmpVal, &(*(yyvsp[0].ValueList))[0], (yyvsp[0].ValueList)->size());
+ delete (yyvsp[-2].TypeVal);
+ delete (yyvsp[0].ValueList);
+ ;}
+ break;
+
+
+ default: break;
+ }
+
+/* Line 1126 of yacc.c. */
+#line 5590 "llvmAsmParser.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
+
+ YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
yyn = yyr1[yyn];
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
- yystate = yydefgoto[yyn - YYNTBASE];
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
-yyerrlab: /* here on detecting error */
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
{
++yynerrs;
-
-#ifdef YYERROR_VERBOSE
+#if YYERROR_VERBOSE
yyn = yypact[yystate];
- if (yyn > YYFLAG && yyn < YYLAST)
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
{
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) malloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
- if (count < 5)
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
{
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
}
- yyerror(msg);
- free(msg);
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
}
else
- yyerror ("parse error; also virtual memory exceeded");
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
+ yyerror (YY_("syntax error"));
}
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
+
if (yyerrstatus == 3)
{
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
+ /* If just tried and failed to reuse look-ahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding", yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token
- after shifting the error token. */
+ /* Else will try to reuse look-ahead token after shifting the error
+ token. */
+ goto yyerrlab1;
- yyerrstatus = 3; /* Each real token shifted decrements this */
- goto yyerrhandle;
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
-yyerrdefault: /* current state does not do anything special for the error token. */
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (0)
+ goto yyerrorlab;
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
-yyerrpop: /* pop the current state because it cannot handle the error token */
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
-#if YYDEBUG != 0
- if (yydebug)
+ for (;;)
{
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
}
- else if (yyn == 0)
- goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
*++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
- yyacceptlab:
- /* YYACCEPT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
#endif
- }
- return 0;
- yyabortlab:
- /* YYABORT comes here. */
- if (yyfree_stacks)
+yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
{
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
}
- return 1;
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
}
-#line 2874 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y"
+
+
+#line 2874 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
// common code from the two 'RunVMAsmParser' functions
@@ -5002,3 +5903,4 @@ int yyerror(const char *ErrorMsg) {
GenerateError(errMsg);
return 0;
}
+
diff --git a/lib/AsmParser/llvmAsmParser.h.cvs b/lib/AsmParser/llvmAsmParser.h.cvs
index bf20cd5..ea5f3d9 100644
--- a/lib/AsmParser/llvmAsmParser.h.cvs
+++ b/lib/AsmParser/llvmAsmParser.h.cvs
@@ -1,4 +1,302 @@
-typedef union {
+/* A Bison parser, made by GNU Bison 2.1. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ 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. */
+
+/* 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,
+ LOCALVAL_ID = 260,
+ GLOBALVAL_ID = 261,
+ FPVAL = 262,
+ VOID = 263,
+ INTTYPE = 264,
+ FLOAT = 265,
+ DOUBLE = 266,
+ LABEL = 267,
+ TYPE = 268,
+ LOCALVAR = 269,
+ GLOBALVAR = 270,
+ LABELSTR = 271,
+ STRINGCONSTANT = 272,
+ ATSTRINGCONSTANT = 273,
+ IMPLEMENTATION = 274,
+ ZEROINITIALIZER = 275,
+ TRUETOK = 276,
+ FALSETOK = 277,
+ BEGINTOK = 278,
+ ENDTOK = 279,
+ DECLARE = 280,
+ DEFINE = 281,
+ GLOBAL = 282,
+ CONSTANT = 283,
+ SECTION = 284,
+ VOLATILE = 285,
+ TO = 286,
+ DOTDOTDOT = 287,
+ NULL_TOK = 288,
+ UNDEF = 289,
+ INTERNAL = 290,
+ LINKONCE = 291,
+ WEAK = 292,
+ APPENDING = 293,
+ DLLIMPORT = 294,
+ DLLEXPORT = 295,
+ EXTERN_WEAK = 296,
+ OPAQUE = 297,
+ EXTERNAL = 298,
+ TARGET = 299,
+ TRIPLE = 300,
+ ALIGN = 301,
+ DEPLIBS = 302,
+ CALL = 303,
+ TAIL = 304,
+ ASM_TOK = 305,
+ MODULE = 306,
+ SIDEEFFECT = 307,
+ CC_TOK = 308,
+ CCC_TOK = 309,
+ FASTCC_TOK = 310,
+ COLDCC_TOK = 311,
+ X86_STDCALLCC_TOK = 312,
+ X86_FASTCALLCC_TOK = 313,
+ DATALAYOUT = 314,
+ RET = 315,
+ BR = 316,
+ SWITCH = 317,
+ INVOKE = 318,
+ UNWIND = 319,
+ UNREACHABLE = 320,
+ ADD = 321,
+ SUB = 322,
+ MUL = 323,
+ UDIV = 324,
+ SDIV = 325,
+ FDIV = 326,
+ UREM = 327,
+ SREM = 328,
+ FREM = 329,
+ AND = 330,
+ OR = 331,
+ XOR = 332,
+ SHL = 333,
+ LSHR = 334,
+ ASHR = 335,
+ ICMP = 336,
+ FCMP = 337,
+ EQ = 338,
+ NE = 339,
+ SLT = 340,
+ SGT = 341,
+ SLE = 342,
+ SGE = 343,
+ ULT = 344,
+ UGT = 345,
+ ULE = 346,
+ UGE = 347,
+ OEQ = 348,
+ ONE = 349,
+ OLT = 350,
+ OGT = 351,
+ OLE = 352,
+ OGE = 353,
+ ORD = 354,
+ UNO = 355,
+ UEQ = 356,
+ UNE = 357,
+ MALLOC = 358,
+ ALLOCA = 359,
+ FREE = 360,
+ LOAD = 361,
+ STORE = 362,
+ GETELEMENTPTR = 363,
+ TRUNC = 364,
+ ZEXT = 365,
+ SEXT = 366,
+ FPTRUNC = 367,
+ FPEXT = 368,
+ BITCAST = 369,
+ UITOFP = 370,
+ SITOFP = 371,
+ FPTOUI = 372,
+ FPTOSI = 373,
+ INTTOPTR = 374,
+ PTRTOINT = 375,
+ PHI_TOK = 376,
+ SELECT = 377,
+ VAARG = 378,
+ EXTRACTELEMENT = 379,
+ INSERTELEMENT = 380,
+ SHUFFLEVECTOR = 381,
+ NORETURN = 382,
+ INREG = 383,
+ SRET = 384,
+ DEFAULT = 385,
+ HIDDEN = 386
+ };
+#endif
+/* Tokens. */
+#define ESINT64VAL 258
+#define EUINT64VAL 259
+#define LOCALVAL_ID 260
+#define GLOBALVAL_ID 261
+#define FPVAL 262
+#define VOID 263
+#define INTTYPE 264
+#define FLOAT 265
+#define DOUBLE 266
+#define LABEL 267
+#define TYPE 268
+#define LOCALVAR 269
+#define GLOBALVAR 270
+#define LABELSTR 271
+#define STRINGCONSTANT 272
+#define ATSTRINGCONSTANT 273
+#define IMPLEMENTATION 274
+#define ZEROINITIALIZER 275
+#define TRUETOK 276
+#define FALSETOK 277
+#define BEGINTOK 278
+#define ENDTOK 279
+#define DECLARE 280
+#define DEFINE 281
+#define GLOBAL 282
+#define CONSTANT 283
+#define SECTION 284
+#define VOLATILE 285
+#define TO 286
+#define DOTDOTDOT 287
+#define NULL_TOK 288
+#define UNDEF 289
+#define INTERNAL 290
+#define LINKONCE 291
+#define WEAK 292
+#define APPENDING 293
+#define DLLIMPORT 294
+#define DLLEXPORT 295
+#define EXTERN_WEAK 296
+#define OPAQUE 297
+#define EXTERNAL 298
+#define TARGET 299
+#define TRIPLE 300
+#define ALIGN 301
+#define DEPLIBS 302
+#define CALL 303
+#define TAIL 304
+#define ASM_TOK 305
+#define MODULE 306
+#define SIDEEFFECT 307
+#define CC_TOK 308
+#define CCC_TOK 309
+#define FASTCC_TOK 310
+#define COLDCC_TOK 311
+#define X86_STDCALLCC_TOK 312
+#define X86_FASTCALLCC_TOK 313
+#define DATALAYOUT 314
+#define RET 315
+#define BR 316
+#define SWITCH 317
+#define INVOKE 318
+#define UNWIND 319
+#define UNREACHABLE 320
+#define ADD 321
+#define SUB 322
+#define MUL 323
+#define UDIV 324
+#define SDIV 325
+#define FDIV 326
+#define UREM 327
+#define SREM 328
+#define FREM 329
+#define AND 330
+#define OR 331
+#define XOR 332
+#define SHL 333
+#define LSHR 334
+#define ASHR 335
+#define ICMP 336
+#define FCMP 337
+#define EQ 338
+#define NE 339
+#define SLT 340
+#define SGT 341
+#define SLE 342
+#define SGE 343
+#define ULT 344
+#define UGT 345
+#define ULE 346
+#define UGE 347
+#define OEQ 348
+#define ONE 349
+#define OLT 350
+#define OGT 351
+#define OLE 352
+#define OGE 353
+#define ORD 354
+#define UNO 355
+#define UEQ 356
+#define UNE 357
+#define MALLOC 358
+#define ALLOCA 359
+#define FREE 360
+#define LOAD 361
+#define STORE 362
+#define GETELEMENTPTR 363
+#define TRUNC 364
+#define ZEXT 365
+#define SEXT 366
+#define FPTRUNC 367
+#define FPEXT 368
+#define BITCAST 369
+#define UITOFP 370
+#define SITOFP 371
+#define FPTOUI 372
+#define FPTOSI 373
+#define INTTOPTR 374
+#define PTRTOINT 375
+#define PHI_TOK 376
+#define SELECT 377
+#define VAARG 378
+#define EXTRACTELEMENT 379
+#define INSERTELEMENT 380
+#define SHUFFLEVECTOR 381
+#define NORETURN 382
+#define INREG 383
+#define SRET 384
+#define DEFAULT 385
+#define HIDDEN 386
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 901 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
+typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
llvm::BasicBlock *BasicBlockVal;
@@ -43,135 +341,14 @@ typedef union {
llvm::ICmpInst::Predicate IPredicate;
llvm::FCmpInst::Predicate FPredicate;
} YYSTYPE;
-#define ESINT64VAL 257
-#define EUINT64VAL 258
-#define LOCALVAL_ID 259
-#define GLOBALVAL_ID 260
-#define FPVAL 261
-#define VOID 262
-#define INTTYPE 263
-#define FLOAT 264
-#define DOUBLE 265
-#define LABEL 266
-#define TYPE 267
-#define LOCALVAR 268
-#define GLOBALVAR 269
-#define LABELSTR 270
-#define STRINGCONSTANT 271
-#define ATSTRINGCONSTANT 272
-#define IMPLEMENTATION 273
-#define ZEROINITIALIZER 274
-#define TRUETOK 275
-#define FALSETOK 276
-#define BEGINTOK 277
-#define ENDTOK 278
-#define DECLARE 279
-#define DEFINE 280
-#define GLOBAL 281
-#define CONSTANT 282
-#define SECTION 283
-#define VOLATILE 284
-#define TO 285
-#define DOTDOTDOT 286
-#define NULL_TOK 287
-#define UNDEF 288
-#define INTERNAL 289
-#define LINKONCE 290
-#define WEAK 291
-#define APPENDING 292
-#define DLLIMPORT 293
-#define DLLEXPORT 294
-#define EXTERN_WEAK 295
-#define OPAQUE 296
-#define EXTERNAL 297
-#define TARGET 298
-#define TRIPLE 299
-#define ALIGN 300
-#define DEPLIBS 301
-#define CALL 302
-#define TAIL 303
-#define ASM_TOK 304
-#define MODULE 305
-#define SIDEEFFECT 306
-#define CC_TOK 307
-#define CCC_TOK 308
-#define FASTCC_TOK 309
-#define COLDCC_TOK 310
-#define X86_STDCALLCC_TOK 311
-#define X86_FASTCALLCC_TOK 312
-#define DATALAYOUT 313
-#define RET 314
-#define BR 315
-#define SWITCH 316
-#define INVOKE 317
-#define UNWIND 318
-#define UNREACHABLE 319
-#define ADD 320
-#define SUB 321
-#define MUL 322
-#define UDIV 323
-#define SDIV 324
-#define FDIV 325
-#define UREM 326
-#define SREM 327
-#define FREM 328
-#define AND 329
-#define OR 330
-#define XOR 331
-#define SHL 332
-#define LSHR 333
-#define ASHR 334
-#define ICMP 335
-#define FCMP 336
-#define EQ 337
-#define NE 338
-#define SLT 339
-#define SGT 340
-#define SLE 341
-#define SGE 342
-#define ULT 343
-#define UGT 344
-#define ULE 345
-#define UGE 346
-#define OEQ 347
-#define ONE 348
-#define OLT 349
-#define OGT 350
-#define OLE 351
-#define OGE 352
-#define ORD 353
-#define UNO 354
-#define UEQ 355
-#define UNE 356
-#define MALLOC 357
-#define ALLOCA 358
-#define FREE 359
-#define LOAD 360
-#define STORE 361
-#define GETELEMENTPTR 362
-#define TRUNC 363
-#define ZEXT 364
-#define SEXT 365
-#define FPTRUNC 366
-#define FPEXT 367
-#define BITCAST 368
-#define UITOFP 369
-#define SITOFP 370
-#define FPTOUI 371
-#define FPTOSI 372
-#define INTTOPTR 373
-#define PTRTOINT 374
-#define PHI_TOK 375
-#define SELECT 376
-#define VAARG 377
-#define EXTRACTELEMENT 378
-#define INSERTELEMENT 379
-#define SHUFFLEVECTOR 380
-#define NORETURN 381
-#define INREG 382
-#define SRET 383
-#define DEFAULT 384
-#define HIDDEN 385
-
+/* Line 1447 of yacc.c. */
+#line 346 "llvmAsmParser.tab.h"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
extern YYSTYPE llvmAsmlval;
+
+
+
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index e4a1eac..3f71158 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -1297,10 +1297,10 @@ Types
if ((unsigned)$2 != $2)
GEN_ERROR("Unsigned result not equal to signed result");
if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger())
- GEN_ERROR("Element type of a PackedType must be primitive");
+ GEN_ERROR("Element type of a VectorType must be primitive");
if (!isPowerOf2_32($2))
GEN_ERROR("Vector length should be a power of 2");
- $$ = new PATypeHolder(HandleUpRefs(PackedType::get(*$4, (unsigned)$2)));
+ $$ = new PATypeHolder(HandleUpRefs(VectorType::get(*$4, (unsigned)$2)));
delete $4;
CHECK_FOR_ERROR
}
@@ -1481,7 +1481,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
| Types '<' ConstVector '>' { // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
- const PackedType *PTy = dyn_cast<PackedType>($1->get());
+ const VectorType *PTy = dyn_cast<VectorType>($1->get());
if (PTy == 0)
GEN_ERROR("Cannot make packed constant with type: '" +
(*$1)->getDescription() + "'");
@@ -1502,7 +1502,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
(*$3)[i]->getType()->getDescription() + "'.");
}
- $$ = ConstantPacked::get(PTy, *$3);
+ $$ = ConstantVector::get(PTy, *$3);
delete $1; delete $3;
CHECK_FOR_ERROR
}
@@ -1781,8 +1781,8 @@ ConstExpr: CastOps '(' ConstVal TO Types ')' {
if ($3->getType() != $5->getType())
GEN_ERROR("Logical operator types must match");
if (!$3->getType()->isInteger()) {
- if (Instruction::isShift($1) || !isa<PackedType>($3->getType()) ||
- !cast<PackedType>($3->getType())->getElementType()->isInteger())
+ if (Instruction::isShift($1) || !isa<VectorType>($3->getType()) ||
+ !cast<VectorType>($3->getType())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands");
}
$$ = ConstantExpr::get($1, $3, $5);
@@ -2232,10 +2232,10 @@ ConstValueRef : ESINT64VAL { // A reference to a direct constant
const Type *ETy = (*$2)[0]->getType();
int NumElements = $2->size();
- PackedType* pt = PackedType::get(ETy, NumElements);
+ VectorType* pt = VectorType::get(ETy, NumElements);
PATypeHolder* PTy = new PATypeHolder(
HandleUpRefs(
- PackedType::get(
+ VectorType::get(
ETy,
NumElements)
)
@@ -2249,7 +2249,7 @@ ConstValueRef : ESINT64VAL { // A reference to a direct constant
(*$2)[i]->getType()->getDescription() + "'.");
}
- $$ = ValID::create(ConstantPacked::get(pt, *$2));
+ $$ = ValID::create(ConstantVector::get(pt, *$2));
delete PTy; delete $2;
CHECK_FOR_ERROR
}
@@ -2585,10 +2585,10 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
if (!(*$2)->isInteger() && !(*$2)->isFloatingPoint() &&
- !isa<PackedType>((*$2).get()))
+ !isa<VectorType>((*$2).get()))
GEN_ERROR(
"Arithmetic operator requires integer, FP, or packed operands");
- if (isa<PackedType>((*$2).get()) &&
+ if (isa<VectorType>((*$2).get()) &&
($1 == Instruction::URem ||
$1 == Instruction::SRem ||
$1 == Instruction::FRem))
@@ -2606,8 +2606,8 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
if (!(*$2)->isInteger()) {
- if (Instruction::isShift($1) || !isa<PackedType>($2->get()) ||
- !cast<PackedType>($2->get())->getElementType()->isInteger())
+ if (Instruction::isShift($1) || !isa<VectorType>($2->get()) ||
+ !cast<VectorType>($2->get())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands");
}
Value* tmpVal1 = getVal(*$2, $3);
@@ -2622,7 +2622,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
| ICMP IPredicates Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
- if (isa<PackedType>((*$3).get()))
+ if (isa<VectorType>((*$3).get()))
GEN_ERROR("Packed types not supported by icmp instruction");
Value* tmpVal1 = getVal(*$3, $4);
CHECK_FOR_ERROR
@@ -2635,7 +2635,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
| FCMP FPredicates Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
- if (isa<PackedType>((*$3).get()))
+ if (isa<VectorType>((*$3).get()))
GEN_ERROR("Packed types not supported by fcmp instruction");
Value* tmpVal1 = getVal(*$3, $4);
CHECK_FOR_ERROR
diff --git a/lib/AsmParser/llvmAsmParser.y.cvs b/lib/AsmParser/llvmAsmParser.y.cvs
index e4a1eac..3f71158 100644
--- a/lib/AsmParser/llvmAsmParser.y.cvs
+++ b/lib/AsmParser/llvmAsmParser.y.cvs
@@ -1297,10 +1297,10 @@ Types
if ((unsigned)$2 != $2)
GEN_ERROR("Unsigned result not equal to signed result");
if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger())
- GEN_ERROR("Element type of a PackedType must be primitive");
+ GEN_ERROR("Element type of a VectorType must be primitive");
if (!isPowerOf2_32($2))
GEN_ERROR("Vector length should be a power of 2");
- $$ = new PATypeHolder(HandleUpRefs(PackedType::get(*$4, (unsigned)$2)));
+ $$ = new PATypeHolder(HandleUpRefs(VectorType::get(*$4, (unsigned)$2)));
delete $4;
CHECK_FOR_ERROR
}
@@ -1481,7 +1481,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
| Types '<' ConstVector '>' { // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
- const PackedType *PTy = dyn_cast<PackedType>($1->get());
+ const VectorType *PTy = dyn_cast<VectorType>($1->get());
if (PTy == 0)
GEN_ERROR("Cannot make packed constant with type: '" +
(*$1)->getDescription() + "'");
@@ -1502,7 +1502,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
(*$3)[i]->getType()->getDescription() + "'.");
}
- $$ = ConstantPacked::get(PTy, *$3);
+ $$ = ConstantVector::get(PTy, *$3);
delete $1; delete $3;
CHECK_FOR_ERROR
}
@@ -1781,8 +1781,8 @@ ConstExpr: CastOps '(' ConstVal TO Types ')' {
if ($3->getType() != $5->getType())
GEN_ERROR("Logical operator types must match");
if (!$3->getType()->isInteger()) {
- if (Instruction::isShift($1) || !isa<PackedType>($3->getType()) ||
- !cast<PackedType>($3->getType())->getElementType()->isInteger())
+ if (Instruction::isShift($1) || !isa<VectorType>($3->getType()) ||
+ !cast<VectorType>($3->getType())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands");
}
$$ = ConstantExpr::get($1, $3, $5);
@@ -2232,10 +2232,10 @@ ConstValueRef : ESINT64VAL { // A reference to a direct constant
const Type *ETy = (*$2)[0]->getType();
int NumElements = $2->size();
- PackedType* pt = PackedType::get(ETy, NumElements);
+ VectorType* pt = VectorType::get(ETy, NumElements);
PATypeHolder* PTy = new PATypeHolder(
HandleUpRefs(
- PackedType::get(
+ VectorType::get(
ETy,
NumElements)
)
@@ -2249,7 +2249,7 @@ ConstValueRef : ESINT64VAL { // A reference to a direct constant
(*$2)[i]->getType()->getDescription() + "'.");
}
- $$ = ValID::create(ConstantPacked::get(pt, *$2));
+ $$ = ValID::create(ConstantVector::get(pt, *$2));
delete PTy; delete $2;
CHECK_FOR_ERROR
}
@@ -2585,10 +2585,10 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
if (!(*$2)->isInteger() && !(*$2)->isFloatingPoint() &&
- !isa<PackedType>((*$2).get()))
+ !isa<VectorType>((*$2).get()))
GEN_ERROR(
"Arithmetic operator requires integer, FP, or packed operands");
- if (isa<PackedType>((*$2).get()) &&
+ if (isa<VectorType>((*$2).get()) &&
($1 == Instruction::URem ||
$1 == Instruction::SRem ||
$1 == Instruction::FRem))
@@ -2606,8 +2606,8 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
if (!(*$2)->isInteger()) {
- if (Instruction::isShift($1) || !isa<PackedType>($2->get()) ||
- !cast<PackedType>($2->get())->getElementType()->isInteger())
+ if (Instruction::isShift($1) || !isa<VectorType>($2->get()) ||
+ !cast<VectorType>($2->get())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands");
}
Value* tmpVal1 = getVal(*$2, $3);
@@ -2622,7 +2622,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
| ICMP IPredicates Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
- if (isa<PackedType>((*$3).get()))
+ if (isa<VectorType>((*$3).get()))
GEN_ERROR("Packed types not supported by icmp instruction");
Value* tmpVal1 = getVal(*$3, $4);
CHECK_FOR_ERROR
@@ -2635,7 +2635,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
| FCMP FPredicates Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
- if (isa<PackedType>((*$3).get()))
+ if (isa<VectorType>((*$3).get()))
GEN_ERROR("Packed types not supported by fcmp instruction");
Value* tmpVal1 = getVal(*$3, $4);
CHECK_FOR_ERROR
diff --git a/lib/Bytecode/Reader/Analyzer.cpp b/lib/Bytecode/Reader/Analyzer.cpp
index 880605c..75b3ca7 100644
--- a/lib/Bytecode/Reader/Analyzer.cpp
+++ b/lib/Bytecode/Reader/Analyzer.cpp
@@ -423,8 +423,8 @@ public:
bca.numValues++;
}
- virtual void handleConstantPacked(
- const PackedType* PT,
+ virtual void handleConstantVector(
+ const VectorType* PT,
Constant**Elements, unsigned NumElts,
unsigned TypeSlot,
Constant* PackedVal)
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index d516910..bafe7d3 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -482,7 +482,7 @@ void BytecodeReader::ParseInstruction(SmallVector<unsigned, 8> &Oprnds,
break;
}
case Instruction::InsertElement: {
- const PackedType *PackedTy = dyn_cast<PackedType>(InstTy);
+ const VectorType *PackedTy = dyn_cast<VectorType>(InstTy);
if (!PackedTy || Oprnds.size() != 3)
error("Invalid insertelement instruction!");
@@ -496,13 +496,13 @@ void BytecodeReader::ParseInstruction(SmallVector<unsigned, 8> &Oprnds,
break;
}
case Instruction::ShuffleVector: {
- const PackedType *PackedTy = dyn_cast<PackedType>(InstTy);
+ const VectorType *PackedTy = dyn_cast<VectorType>(InstTy);
if (!PackedTy || Oprnds.size() != 3)
error("Invalid shufflevector instruction!");
Value *V1 = getValue(iType, Oprnds[0]);
Value *V2 = getValue(iType, Oprnds[1]);
- const PackedType *EltTy =
- PackedType::get(Type::Int32Ty, PackedTy->getNumElements());
+ const VectorType *EltTy =
+ VectorType::get(Type::Int32Ty, PackedTy->getNumElements());
Value *V3 = getValue(getTypeSlot(EltTy), Oprnds[2]);
if (!ShuffleVectorInst::isValidOperands(V1, V2, V3))
error("Invalid shufflevector instruction!");
@@ -1029,10 +1029,10 @@ const Type *BytecodeReader::ParseType() {
Result = ArrayType::get(ElementType, NumElements);
break;
}
- case Type::PackedTyID: {
+ case Type::VectorTyID: {
const Type *ElementType = readType();
unsigned NumElements = read_vbr_uint();
- Result = PackedType::get(ElementType, NumElements);
+ Result = VectorType::get(ElementType, NumElements);
break;
}
case Type::StructTyID: {
@@ -1314,8 +1314,8 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) {
break;
}
- case Type::PackedTyID: {
- const PackedType *PT = cast<PackedType>(Ty);
+ case Type::VectorTyID: {
+ const VectorType *PT = cast<VectorType>(Ty);
unsigned NumElements = PT->getNumElements();
unsigned TypeSlot = getTypeSlot(PT->getElementType());
std::vector<Constant*> Elements;
@@ -1323,8 +1323,8 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) {
while (NumElements--) // Read all of the elements of the constant.
Elements.push_back(getConstantValue(TypeSlot,
read_vbr_uint()));
- Result = ConstantPacked::get(PT, Elements);
- if (Handler) Handler->handleConstantPacked(PT, &Elements[0],Elements.size(),
+ Result = ConstantVector::get(PT, Elements);
+ if (Handler) Handler->handleConstantVector(PT, &Elements[0],Elements.size(),
TypeSlot, Result);
break;
}
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 78d6283..de15267 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -242,8 +242,8 @@ void BytecodeWriter::outputType(const Type *T) {
break;
}
- case Type::PackedTyID: {
- const PackedType *PT = cast<PackedType>(T);
+ case Type::VectorTyID: {
+ const VectorType *PT = cast<VectorType>(T);
output_typeid(Table.getTypeSlot(PT->getElementType()));
output_vbr(PT->getNumElements());
break;
@@ -326,8 +326,8 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
break;
}
- case Type::PackedTyID: {
- const ConstantPacked *CP = cast<ConstantPacked>(CPV);
+ case Type::VectorTyID: {
+ const ConstantVector *CP = cast<ConstantVector>(CPV);
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
output_vbr(Table.getSlot(CP->getOperand(i)));
break;
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 4e7db4e..fdc3e5a 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -805,8 +805,8 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) {
}
return;
}
- } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(CV)) {
- const PackedType *PTy = CP->getType();
+ } else if (const ConstantVector *CP = dyn_cast<ConstantVector>(CV)) {
+ const VectorType *PTy = CP->getType();
for (unsigned I = 0, E = PTy->getNumElements(); I < E; ++I)
EmitGlobalConstant(CP->getOperand(I));
diff --git a/lib/CodeGen/MachOWriter.cpp b/lib/CodeGen/MachOWriter.cpp
index 0b7dfab..8701347 100644
--- a/lib/CodeGen/MachOWriter.cpp
+++ b/lib/CodeGen/MachOWriter.cpp
@@ -769,7 +769,7 @@ void MachOWriter::InitMem(const Constant *C, void *Addr, intptr_t Offset,
if (isa<UndefValue>(PC)) {
continue;
- } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(PC)) {
+ } else if (const ConstantVector *CP = dyn_cast<ConstantVector>(PC)) {
unsigned ElementSize = TD->getTypeSize(CP->getType()->getElementType());
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
WorkList.push_back(CPair(CP->getOperand(i), PA+i*ElementSize));
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 0bd40c2..87dffdc 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -3874,7 +3874,7 @@ SDOperand SelectionDAGLegalize::ExpandBUILD_VECTOR(SDNode *Node) {
CV.push_back(UndefValue::get(OpNTy));
}
}
- Constant *CP = ConstantPacked::get(CV);
+ Constant *CP = ConstantVector::get(CV);
SDOperand CPIdx = DAG.getConstantPool(CP, TLI.getPointerTy());
return DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0);
}
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 909dc68..a156bda 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -281,7 +281,7 @@ FunctionLoweringInfo::FunctionLoweringInfo(TargetLowering &tli,
else {
MVT::ValueType VT1,VT2;
NumElements =
- TLI.getPackedTypeBreakdown(cast<PackedType>(PN->getType()),
+ TLI.getVectorTypeBreakdown(cast<VectorType>(PN->getType()),
VT1, VT2);
}
unsigned PHIReg = ValueMap[PN];
@@ -306,7 +306,7 @@ unsigned FunctionLoweringInfo::CreateRegForValue(const Value *V) {
// If this is a packed type, figure out what type it will decompose into
// and how many of the elements it will use.
if (VT == MVT::Vector) {
- const PackedType *PTy = cast<PackedType>(V->getType());
+ const VectorType *PTy = cast<VectorType>(V->getType());
unsigned NumElts = PTy->getNumElements();
MVT::ValueType EltTy = TLI.getValueType(PTy->getElementType());
@@ -504,7 +504,7 @@ public:
void visitEitherBinary(User &I, unsigned ScalarOp, unsigned VectorOp);
void visitShift(User &I, unsigned Opcode);
void visitAdd(User &I) {
- if (isa<PackedType>(I.getType()))
+ if (isa<VectorType>(I.getType()))
visitVectorBinary(I, ISD::VADD);
else if (I.getType()->isFloatingPoint())
visitScalarBinary(I, ISD::FADD);
@@ -513,7 +513,7 @@ public:
}
void visitSub(User &I);
void visitMul(User &I) {
- if (isa<PackedType>(I.getType()))
+ if (isa<VectorType>(I.getType()))
visitVectorBinary(I, ISD::VMUL);
else if (I.getType()->isFloatingPoint())
visitScalarBinary(I, ISD::FMUL);
@@ -601,11 +601,11 @@ SDOperand SelectionDAGLowering::getValue(const Value *V) {
} else if (isa<ConstantPointerNull>(C)) {
return N = DAG.getConstant(0, TLI.getPointerTy());
} else if (isa<UndefValue>(C)) {
- if (!isa<PackedType>(VTy))
+ if (!isa<VectorType>(VTy))
return N = DAG.getNode(ISD::UNDEF, VT);
// Create a VBUILD_VECTOR of undef nodes.
- const PackedType *PTy = cast<PackedType>(VTy);
+ const VectorType *PTy = cast<VectorType>(VTy);
unsigned NumElements = PTy->getNumElements();
MVT::ValueType PVT = TLI.getValueType(PTy->getElementType());
@@ -619,7 +619,7 @@ SDOperand SelectionDAGLowering::getValue(const Value *V) {
&Ops[0], Ops.size());
} else if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) {
return N = DAG.getConstantFP(CFP->getValue(), VT);
- } else if (const PackedType *PTy = dyn_cast<PackedType>(VTy)) {
+ } else if (const VectorType *PTy = dyn_cast<VectorType>(VTy)) {
unsigned NumElements = PTy->getNumElements();
MVT::ValueType PVT = TLI.getValueType(PTy->getElementType());
@@ -627,7 +627,7 @@ SDOperand SelectionDAGLowering::getValue(const Value *V) {
// Constant or ConstantFP node onto the ops list for each element of
// the packed constant.
SmallVector<SDOperand, 8> Ops;
- if (ConstantPacked *CP = dyn_cast<ConstantPacked>(C)) {
+ if (ConstantVector *CP = dyn_cast<ConstantVector>(C)) {
for (unsigned i = 0; i != NumElements; ++i)
Ops.push_back(getValue(CP->getOperand(i)));
} else {
@@ -691,8 +691,8 @@ SDOperand SelectionDAGLowering::getValue(const Value *V) {
// Otherwise, if this is a vector, make it available as a generic vector
// here.
MVT::ValueType PTyElementVT, PTyLegalElementVT;
- const PackedType *PTy = cast<PackedType>(VTy);
- unsigned NE = TLI.getPackedTypeBreakdown(PTy, PTyElementVT,
+ const VectorType *PTy = cast<VectorType>(VTy);
+ unsigned NE = TLI.getVectorTypeBreakdown(PTy, PTyElementVT,
PTyLegalElementVT);
// Build a VBUILD_VECTOR with the input registers.
@@ -1377,7 +1377,7 @@ void SelectionDAGLowering::visitSwitch(SwitchInst &I) {
void SelectionDAGLowering::visitSub(User &I) {
// -0.0 - X --> fneg
const Type *Ty = I.getType();
- if (isa<PackedType>(Ty)) {
+ if (isa<VectorType>(Ty)) {
visitVectorBinary(I, ISD::VSUB);
} else if (Ty->isFloatingPoint()) {
if (ConstantFP *CFP = dyn_cast<ConstantFP>(I.getOperand(0)))
@@ -1400,8 +1400,8 @@ void SelectionDAGLowering::visitScalarBinary(User &I, unsigned OpCode) {
void
SelectionDAGLowering::visitVectorBinary(User &I, unsigned OpCode) {
- assert(isa<PackedType>(I.getType()));
- const PackedType *Ty = cast<PackedType>(I.getType());
+ assert(isa<VectorType>(I.getType()));
+ const VectorType *Ty = cast<VectorType>(I.getType());
SDOperand Typ = DAG.getValueType(TLI.getValueType(Ty->getElementType()));
setValue(&I, DAG.getNode(OpCode, MVT::Vector,
@@ -1413,7 +1413,7 @@ SelectionDAGLowering::visitVectorBinary(User &I, unsigned OpCode) {
void SelectionDAGLowering::visitEitherBinary(User &I, unsigned ScalarOp,
unsigned VectorOp) {
- if (isa<PackedType>(I.getType()))
+ if (isa<VectorType>(I.getType()))
visitVectorBinary(I, VectorOp);
else
visitScalarBinary(I, ScalarOp);
@@ -1501,7 +1501,7 @@ void SelectionDAGLowering::visitSelect(User &I) {
SDOperand Cond = getValue(I.getOperand(0));
SDOperand TrueVal = getValue(I.getOperand(1));
SDOperand FalseVal = getValue(I.getOperand(2));
- if (!isa<PackedType>(I.getType())) {
+ if (!isa<VectorType>(I.getType())) {
setValue(&I, DAG.getNode(ISD::SELECT, TrueVal.getValueType(), Cond,
TrueVal, FalseVal));
} else {
@@ -1611,7 +1611,7 @@ void SelectionDAGLowering::visitBitCast(User &I) {
if (DestVT == MVT::Vector) {
// This is a cast to a vector from something else.
// Get information about the output vector.
- const PackedType *DestTy = cast<PackedType>(I.getType());
+ const VectorType *DestTy = cast<VectorType>(I.getType());
MVT::ValueType EltVT = TLI.getValueType(DestTy->getElementType());
setValue(&I, DAG.getNode(ISD::VBIT_CONVERT, DestVT, N,
DAG.getConstant(DestTy->getNumElements(),MVT::i32),
@@ -1793,7 +1793,7 @@ SDOperand SelectionDAGLowering::getLoadFrom(const Type *Ty, SDOperand Ptr,
const Value *SV, SDOperand Root,
bool isVolatile) {
SDOperand L;
- if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) {
+ if (const VectorType *PTy = dyn_cast<VectorType>(Ty)) {
MVT::ValueType PVT = TLI.getValueType(PTy->getElementType());
L = DAG.getVecLoad(PTy->getNumElements(), PVT, Root, Ptr,
DAG.getSrcValue(SV));
@@ -1863,7 +1863,7 @@ void SelectionDAGLowering::visitTargetIntrinsic(CallInst &I,
// If this is a vector type, force it to the right packed type.
if (Op.getValueType() == MVT::Vector) {
- const PackedType *OpTy = cast<PackedType>(I.getOperand(i)->getType());
+ const VectorType *OpTy = cast<VectorType>(I.getOperand(i)->getType());
MVT::ValueType EltVT = TLI.getValueType(OpTy->getElementType());
MVT::ValueType VVT = MVT::getVectorType(EltVT, OpTy->getNumElements());
@@ -1880,7 +1880,7 @@ void SelectionDAGLowering::visitTargetIntrinsic(CallInst &I,
if (I.getType() != Type::VoidTy) {
MVT::ValueType VT = TLI.getValueType(I.getType());
if (VT == MVT::Vector) {
- const PackedType *DestTy = cast<PackedType>(I.getType());
+ const VectorType *DestTy = cast<VectorType>(I.getType());
MVT::ValueType EltVT = TLI.getValueType(DestTy->getElementType());
VT = MVT::getVectorType(EltVT, DestTy->getNumElements());
@@ -1915,7 +1915,7 @@ void SelectionDAGLowering::visitTargetIntrinsic(CallInst &I,
DAG.setRoot(Chain);
}
if (I.getType() != Type::VoidTy) {
- if (const PackedType *PTy = dyn_cast<PackedType>(I.getType())) {
+ if (const VectorType *PTy = dyn_cast<VectorType>(I.getType())) {
MVT::ValueType EVT = TLI.getValueType(PTy->getElementType());
Result = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Result,
DAG.getConstant(PTy->getNumElements(), MVT::i32),
@@ -2966,8 +2966,8 @@ TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
} else {
// Otherwise, this is a vector type. We only support legal vectors
// right now.
- unsigned NumElems = cast<PackedType>(I->getType())->getNumElements();
- const Type *EltTy = cast<PackedType>(I->getType())->getElementType();
+ unsigned NumElems = cast<VectorType>(I->getType())->getNumElements();
+ const Type *EltTy = cast<VectorType>(I->getType())->getElementType();
// Figure out if there is a Packed type corresponding to this Vector
// type. If so, convert to the packed type.
@@ -3031,7 +3031,7 @@ TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
} else {
// Otherwise, this is a vector type. We only support legal vectors
// right now.
- const PackedType *PTy = cast<PackedType>(I->getType());
+ const VectorType *PTy = cast<VectorType>(I->getType());
unsigned NumElems = PTy->getNumElements();
const Type *EltTy = PTy->getElementType();
@@ -3154,7 +3154,7 @@ TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy,
} else {
// Otherwise, this is a vector type. We only support legal vectors
// right now.
- const PackedType *PTy = cast<PackedType>(Args[i].Ty);
+ const VectorType *PTy = cast<VectorType>(Args[i].Ty);
unsigned NumElems = PTy->getNumElements();
const Type *EltTy = PTy->getElementType();
@@ -3200,7 +3200,7 @@ TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy,
} else {
// Otherwise, this is a vector type. We only support legal vectors
// right now.
- const PackedType *PTy = cast<PackedType>(RetTy);
+ const VectorType *PTy = cast<VectorType>(RetTy);
unsigned NumElems = PTy->getNumElements();
const Type *EltTy = PTy->getElementType();
@@ -3238,8 +3238,8 @@ TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy,
if (VT == MVT::Vector) {
// Insert a VBITCONVERT to convert from the packed result type to the
// MVT::Vector type.
- unsigned NumElems = cast<PackedType>(RetTy)->getNumElements();
- const Type *EltTy = cast<PackedType>(RetTy)->getElementType();
+ unsigned NumElems = cast<VectorType>(RetTy)->getNumElements();
+ const Type *EltTy = cast<VectorType>(RetTy)->getElementType();
// Figure out if there is a Packed type corresponding to this Vector
// type. If so, convert to the packed type.
@@ -3938,7 +3938,7 @@ SDOperand SelectionDAGLowering::CopyValueToVirtualRegister(Value *V,
} else if (SrcVT == MVT::Vector) {
// Handle copies from generic vectors to registers.
MVT::ValueType PTyElementVT, PTyLegalElementVT;
- unsigned NE = TLI.getPackedTypeBreakdown(cast<PackedType>(V->getType()),
+ unsigned NE = TLI.getVectorTypeBreakdown(cast<VectorType>(V->getType()),
PTyElementVT, PTyLegalElementVT);
// Insert a VBIT_CONVERT of the input vector to a "N x PTyElementVT"
@@ -4133,7 +4133,7 @@ void SelectionDAGISel::BuildSelectionDAG(SelectionDAG &DAG, BasicBlock *LLVMBB,
else {
MVT::ValueType VT1,VT2;
NumElements =
- TLI.getPackedTypeBreakdown(cast<PackedType>(PN->getType()),
+ TLI.getVectorTypeBreakdown(cast<VectorType>(PN->getType()),
VT1, VT2);
}
for (unsigned i = 0, e = NumElements; i != e; ++i)
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 64455a1..d389a5a 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -278,13 +278,13 @@ const char *TargetLowering::getTargetNodeName(unsigned Opcode) const {
return NULL;
}
-/// getPackedTypeBreakdown - Packed types are broken down into some number of
+/// getVectorTypeBreakdown - Packed types are broken down into some number of
/// legal first class types. For example, <8 x float> maps to 2 MVT::v4f32
/// with Altivec or SSE1, or 8 promoted MVT::f64 values with the X86 FP stack.
///
/// This method returns the number and type of the resultant breakdown.
///
-unsigned TargetLowering::getPackedTypeBreakdown(const PackedType *PTy,
+unsigned TargetLowering::getVectorTypeBreakdown(const VectorType *PTy,
MVT::ValueType &PTyElementVT,
MVT::ValueType &PTyLegalElementVT) const {
// Figure out the right, legal destination reg to copy into.
@@ -2206,6 +2206,6 @@ MVT::ValueType TargetLowering::getValueType(const Type *Ty) const {
case Type::FloatTyID: return MVT::f32;
case Type::DoubleTyID: return MVT::f64;
case Type::PointerTyID: return PointerTy;
- case Type::PackedTyID: return MVT::Vector;
+ case Type::VectorTyID: return MVT::Vector;
}
}
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index f0ba434..47266bf 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -687,7 +687,7 @@ GenericValue ExecutionEngine::LoadValueFromMemory(GenericValue *Ptr,
void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
if (isa<UndefValue>(Init)) {
return;
- } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(Init)) {
+ } else if (const ConstantVector *CP = dyn_cast<ConstantVector>(Init)) {
unsigned ElementSize =
getTargetData()->getTypeSize(CP->getType()->getElementType());
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index f7accb7..b58b3dc 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -295,11 +295,11 @@ static Value *RemapOperand(const Value *In,
Result = ConstantStruct::get(cast<StructType>(CPS->getType()), Operands);
} else if (isa<ConstantPointerNull>(CPV) || isa<UndefValue>(CPV)) {
Result = const_cast<Constant*>(CPV);
- } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(CPV)) {
+ } else if (const ConstantVector *CP = dyn_cast<ConstantVector>(CPV)) {
std::vector<Constant*> Operands(CP->getNumOperands());
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
Operands[i] = cast<Constant>(RemapOperand(CP->getOperand(i), ValueMap));
- Result = ConstantPacked::get(Operands);
+ Result = ConstantVector::get(Operands);
} else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CPV)) {
std::vector<Constant*> Ops;
for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i)
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index ffa3b1e..460bf66 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -151,7 +151,7 @@ namespace {
void printConstantWithCast(Constant *CPV, unsigned Opcode);
bool printConstExprCast(const ConstantExpr *CE);
void printConstantArray(ConstantArray *CPA);
- void printConstantPacked(ConstantPacked *CP);
+ void printConstantVector(ConstantVector *CP);
// isInlinableInst - Attempt to inline instructions into their uses to build
// trees as much as possible. To do this, we have to consistently decide
@@ -458,7 +458,7 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
std::string ptrName = "*" + NameSoFar;
if (isa<ArrayType>(PTy->getElementType()) ||
- isa<PackedType>(PTy->getElementType()))
+ isa<VectorType>(PTy->getElementType()))
ptrName = "(" + ptrName + ")";
return printType(Out, PTy->getElementType(), false, ptrName);
@@ -472,8 +472,8 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty,
NameSoFar + "[" + utostr(NumElements) + "]");
}
- case Type::PackedTyID: {
- const PackedType *PTy = cast<PackedType>(Ty);
+ case Type::VectorTyID: {
+ const VectorType *PTy = cast<VectorType>(Ty);
unsigned NumElements = PTy->getNumElements();
if (NumElements == 0) NumElements = 1;
return printType(Out, PTy->getElementType(), false,
@@ -563,7 +563,7 @@ void CWriter::printConstantArray(ConstantArray *CPA) {
}
}
-void CWriter::printConstantPacked(ConstantPacked *CP) {
+void CWriter::printConstantVector(ConstantVector *CP) {
Out << '{';
if (CP->getNumOperands()) {
Out << ' ';
@@ -926,9 +926,9 @@ void CWriter::printConstant(Constant *CPV) {
}
break;
- case Type::PackedTyID:
+ case Type::VectorTyID:
if (isa<ConstantAggregateZero>(CPV) || isa<UndefValue>(CPV)) {
- const PackedType *AT = cast<PackedType>(CPV->getType());
+ const VectorType *AT = cast<VectorType>(CPV->getType());
Out << '{';
if (AT->getNumElements()) {
Out << ' ';
@@ -941,7 +941,7 @@ void CWriter::printConstant(Constant *CPV) {
}
Out << " }";
} else {
- printConstantPacked(cast<ConstantPacked>(CPV));
+ printConstantVector(cast<ConstantVector>(CPV));
}
break;
@@ -1589,7 +1589,7 @@ bool CWriter::doInitialization(Module &M) {
Out << " = " ;
if (isa<StructType>(I->getInitializer()->getType()) ||
isa<ArrayType>(I->getInitializer()->getType()) ||
- isa<PackedType>(I->getInitializer()->getType())) {
+ isa<VectorType>(I->getInitializer()->getType())) {
Out << "{ 0 }";
} else {
// Just print it out normally.
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index a07c69f..ed9d846 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -414,8 +414,8 @@ uint64_t TargetData::getTypeSize(const Type *Ty) const {
return 4;
case Type::DoubleTyID:
return 8;
- case Type::PackedTyID: {
- const PackedType *PTy = cast<PackedType>(Ty);
+ case Type::VectorTyID: {
+ const VectorType *PTy = cast<VectorType>(Ty);
return PTy->getBitWidth() / 8;
}
default:
@@ -483,7 +483,7 @@ unsigned char TargetData::getAlignment(const Type *Ty, bool abi_or_pref) const
case Type::DoubleTyID:
AlignType = FLOAT_ALIGN;
break;
- case Type::PackedTyID:
+ case Type::VectorTyID:
AlignType = PACKED_ALIGN;
break;
default:
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index e2e707c..dbdea1e 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -278,7 +278,7 @@ static Constant *getAggregateConstantElement(Constant *Agg, Constant *Idx) {
if (IdxV < CS->getNumOperands()) return CS->getOperand(IdxV);
} else if (ConstantArray *CA = dyn_cast<ConstantArray>(Agg)) {
if (IdxV < CA->getNumOperands()) return CA->getOperand(IdxV);
- } else if (ConstantPacked *CP = dyn_cast<ConstantPacked>(Agg)) {
+ } else if (ConstantVector *CP = dyn_cast<ConstantVector>(Agg)) {
if (IdxV < CP->getNumOperands()) return CP->getOperand(IdxV);
} else if (isa<ConstantAggregateZero>(Agg)) {
if (const StructType *STy = dyn_cast<StructType>(Agg->getType())) {
@@ -398,7 +398,7 @@ static GlobalVariable *SRAGlobal(GlobalVariable *GV) {
unsigned NumElements = 0;
if (const ArrayType *ATy = dyn_cast<ArrayType>(STy))
NumElements = ATy->getNumElements();
- else if (const PackedType *PTy = dyn_cast<PackedType>(STy))
+ else if (const VectorType *PTy = dyn_cast<VectorType>(STy))
NumElements = PTy->getNumElements();
else
assert(0 && "Unknown aggregate sequential type!");
@@ -1346,7 +1346,7 @@ bool GlobalOpt::ProcessInternalGlobal(GlobalVariable *GV,
if (Constant *SOVConstant = dyn_cast<Constant>(GS.StoredOnceValue))
if (GV->getType()->getElementType() != Type::Int1Ty &&
!GV->getType()->getElementType()->isFloatingPoint() &&
- !isa<PackedType>(GV->getType()->getElementType()) &&
+ !isa<VectorType>(GV->getType()->getElementType()) &&
!GS.HasPHIUser) {
DOUT << " *** SHRINKING TO BOOL: " << *GV;
ShrinkGlobalToBoolean(GV, SOVConstant);
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 84b8311..65b1eb4 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1262,7 +1262,7 @@ bool InstCombiner::SimplifyDemandedBits(Value *V, uint64_t DemandedMask,
Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, uint64_t DemandedElts,
uint64_t &UndefElts,
unsigned Depth) {
- unsigned VWidth = cast<PackedType>(V->getType())->getNumElements();
+ unsigned VWidth = cast<VectorType>(V->getType())->getNumElements();
assert(VWidth <= 64 && "Vector too wide to analyze!");
uint64_t EltMask = ~0ULL >> (64-VWidth);
assert(DemandedElts != EltMask && (DemandedElts & ~EltMask) == 0 &&
@@ -1278,8 +1278,8 @@ Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, uint64_t DemandedElts,
}
UndefElts = 0;
- if (ConstantPacked *CP = dyn_cast<ConstantPacked>(V)) {
- const Type *EltTy = cast<PackedType>(V->getType())->getElementType();
+ if (ConstantVector *CP = dyn_cast<ConstantVector>(V)) {
+ const Type *EltTy = cast<VectorType>(V->getType())->getElementType();
Constant *Undef = UndefValue::get(EltTy);
std::vector<Constant*> Elts;
@@ -1295,19 +1295,19 @@ Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, uint64_t DemandedElts,
}
// If we changed the constant, return it.
- Constant *NewCP = ConstantPacked::get(Elts);
+ Constant *NewCP = ConstantVector::get(Elts);
return NewCP != CP ? NewCP : 0;
} else if (isa<ConstantAggregateZero>(V)) {
- // Simplify the CAZ to a ConstantPacked where the non-demanded elements are
+ // Simplify the CAZ to a ConstantVector where the non-demanded elements are
// set to undef.
- const Type *EltTy = cast<PackedType>(V->getType())->getElementType();
+ const Type *EltTy = cast<VectorType>(V->getType())->getElementType();
Constant *Zero = Constant::getNullValue(EltTy);
Constant *Undef = UndefValue::get(EltTy);
std::vector<Constant*> Elts;
for (unsigned i = 0; i != VWidth; ++i)
Elts.push_back((DemandedElts & (1ULL << i)) ? Zero : Undef);
UndefElts = DemandedElts ^ EltMask;
- return ConstantPacked::get(Elts);
+ return ConstantVector::get(Elts);
}
if (!V->hasOneUse()) { // Other users may use these bits.
@@ -1743,7 +1743,7 @@ Instruction *InstCombiner::visitAdd(BinaryOperator &I) {
// See if SimplifyDemandedBits can simplify this. This handles stuff like
// (X & 254)+1 -> (X&254)|1
uint64_t KnownZero, KnownOne;
- if (!isa<PackedType>(I.getType()) &&
+ if (!isa<VectorType>(I.getType()) &&
SimplifyDemandedBits(&I, cast<IntegerType>(I.getType())->getBitMask(),
KnownZero, KnownOne))
return &I;
@@ -3064,12 +3064,12 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
// See if we can simplify any instructions used by the instruction whose sole
// purpose is to compute bits we don't care about.
uint64_t KnownZero, KnownOne;
- if (!isa<PackedType>(I.getType())) {
+ if (!isa<VectorType>(I.getType())) {
if (SimplifyDemandedBits(&I, cast<IntegerType>(I.getType())->getBitMask(),
KnownZero, KnownOne))
return &I;
} else {
- if (ConstantPacked *CP = dyn_cast<ConstantPacked>(Op1)) {
+ if (ConstantVector *CP = dyn_cast<ConstantVector>(Op1)) {
if (CP->isAllOnesValue())
return ReplaceInstUsesWith(I, I.getOperand(0));
}
@@ -3543,7 +3543,7 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
// See if we can simplify any instructions used by the instruction whose sole
// purpose is to compute bits we don't care about.
uint64_t KnownZero, KnownOne;
- if (!isa<PackedType>(I.getType()) &&
+ if (!isa<VectorType>(I.getType()) &&
SimplifyDemandedBits(&I, cast<IntegerType>(I.getType())->getBitMask(),
KnownZero, KnownOne))
return &I;
@@ -3874,7 +3874,7 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) {
// See if we can simplify any instructions used by the instruction whose sole
// purpose is to compute bits we don't care about.
uint64_t KnownZero, KnownOne;
- if (!isa<PackedType>(I.getType()) &&
+ if (!isa<VectorType>(I.getType()) &&
SimplifyDemandedBits(&I, cast<IntegerType>(I.getType())->getBitMask(),
KnownZero, KnownOne))
return &I;
@@ -6460,8 +6460,8 @@ Instruction *InstCombiner::visitBitCast(CastInst &CI) {
if (SVI->hasOneUse()) {
// Okay, we have (bitconvert (shuffle ..)). Check to see if this is
// a bitconvert to a vector with the same # elts.
- if (isa<PackedType>(DestTy) &&
- cast<PackedType>(DestTy)->getNumElements() ==
+ if (isa<VectorType>(DestTy) &&
+ cast<VectorType>(DestTy)->getNumElements() ==
SVI->getType()->getNumElements()) {
CastInst *Tmp;
// If either of the operands is a cast from CI.getType(), then
@@ -7082,7 +7082,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
case Intrinsic::ppc_altivec_vperm:
// Turn vperm(V1,V2,mask) -> shuffle(V1,V2,mask) if mask is a constant.
- if (ConstantPacked *Mask = dyn_cast<ConstantPacked>(II->getOperand(3))) {
+ if (ConstantVector *Mask = dyn_cast<ConstantVector>(II->getOperand(3))) {
assert(Mask->getNumOperands() == 16 && "Bad type for intrinsic!");
// Check that all of the elements are integer constants or undefs.
@@ -8037,7 +8037,7 @@ static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI) {
const Type *SrcPTy = SrcTy->getElementType();
if (DestPTy->isInteger() || isa<PointerType>(DestPTy) ||
- isa<PackedType>(DestPTy)) {
+ isa<VectorType>(DestPTy)) {
// If the source is an array, the code below will not succeed. Check to
// see if a trivial 'gep P, 0, 0' will help matters. Only do this for
// constants.
@@ -8052,7 +8052,7 @@ static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI) {
}
if ((SrcPTy->isInteger() || isa<PointerType>(SrcPTy) ||
- isa<PackedType>(SrcPTy)) &&
+ isa<VectorType>(SrcPTy)) &&
// Do not allow turning this into a load of an integer, which is then
// casted to a pointer, this pessimizes pointer analysis a lot.
(isa<PointerType>(SrcPTy) == isa<PointerType>(LI.getType())) &&
@@ -8516,7 +8516,7 @@ Instruction *InstCombiner::visitSwitchInst(SwitchInst &SI) {
static bool CheapToScalarize(Value *V, bool isConstant) {
if (isa<ConstantAggregateZero>(V))
return true;
- if (ConstantPacked *C = dyn_cast<ConstantPacked>(V)) {
+ if (ConstantVector *C = dyn_cast<ConstantVector>(V)) {
if (isConstant) return true;
// If all elts are the same, we can extract.
Constant *Op0 = C->getOperand(0);
@@ -8561,7 +8561,7 @@ static std::vector<unsigned> getShuffleMask(const ShuffleVectorInst *SVI) {
return std::vector<unsigned>(NElts, 2*NElts);
std::vector<unsigned> Result;
- const ConstantPacked *CP = cast<ConstantPacked>(SVI->getOperand(2));
+ const ConstantVector *CP = cast<ConstantVector>(SVI->getOperand(2));
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
if (isa<UndefValue>(CP->getOperand(i)))
Result.push_back(NElts*2); // undef -> 8
@@ -8574,8 +8574,8 @@ static std::vector<unsigned> getShuffleMask(const ShuffleVectorInst *SVI) {
/// value is already around as a register, for example if it were inserted then
/// extracted from the vector.
static Value *FindScalarElement(Value *V, unsigned EltNo) {
- assert(isa<PackedType>(V->getType()) && "Not looking at a vector?");
- const PackedType *PTy = cast<PackedType>(V->getType());
+ assert(isa<VectorType>(V->getType()) && "Not looking at a vector?");
+ const VectorType *PTy = cast<VectorType>(V->getType());
unsigned Width = PTy->getNumElements();
if (EltNo >= Width) // Out of range access.
return UndefValue::get(PTy->getElementType());
@@ -8584,7 +8584,7 @@ static Value *FindScalarElement(Value *V, unsigned EltNo) {
return UndefValue::get(PTy->getElementType());
else if (isa<ConstantAggregateZero>(V))
return Constant::getNullValue(PTy->getElementType());
- else if (ConstantPacked *CP = dyn_cast<ConstantPacked>(V))
+ else if (ConstantVector *CP = dyn_cast<ConstantVector>(V))
return CP->getOperand(EltNo);
else if (InsertElementInst *III = dyn_cast<InsertElementInst>(V)) {
// If this is an insert to a variable element, we don't know what it is.
@@ -8624,7 +8624,7 @@ Instruction *InstCombiner::visitExtractElementInst(ExtractElementInst &EI) {
if (isa<ConstantAggregateZero>(EI.getOperand(0)))
return ReplaceInstUsesWith(EI, Constant::getNullValue(EI.getType()));
- if (ConstantPacked *C = dyn_cast<ConstantPacked>(EI.getOperand(0))) {
+ if (ConstantVector *C = dyn_cast<ConstantVector>(EI.getOperand(0))) {
// If packed val is constant with uniform operands, replace EI
// with that operand
Constant *op0 = C->getOperand(0);
@@ -8724,7 +8724,7 @@ static bool CollectSingleShuffleElements(Value *V, Value *LHS, Value *RHS,
std::vector<Constant*> &Mask) {
assert(V->getType() == LHS->getType() && V->getType() == RHS->getType() &&
"Invalid CollectSingleShuffleElements");
- unsigned NumElts = cast<PackedType>(V->getType())->getNumElements();
+ unsigned NumElts = cast<VectorType>(V->getType())->getNumElements();
if (isa<UndefValue>(V)) {
Mask.assign(NumElts, UndefValue::get(Type::Int32Ty));
@@ -8792,10 +8792,10 @@ static bool CollectSingleShuffleElements(Value *V, Value *LHS, Value *RHS,
/// that computes V and the LHS value of the shuffle.
static Value *CollectShuffleElements(Value *V, std::vector<Constant*> &Mask,
Value *&RHS) {
- assert(isa<PackedType>(V->getType()) &&
+ assert(isa<VectorType>(V->getType()) &&
(RHS == 0 || V->getType() == RHS->getType()) &&
"Invalid shuffle!");
- unsigned NumElts = cast<PackedType>(V->getType())->getNumElements();
+ unsigned NumElts = cast<VectorType>(V->getType())->getNumElements();
if (isa<UndefValue>(V)) {
Mask.assign(NumElts, UndefValue::get(Type::Int32Ty));
@@ -8895,7 +8895,7 @@ Instruction *InstCombiner::visitInsertElementInst(InsertElementInst &IE) {
}
Mask[InsertedIdx] = ConstantInt::get(Type::Int32Ty, ExtractedIdx);
return new ShuffleVectorInst(EI->getOperand(0), VecOp,
- ConstantPacked::get(Mask));
+ ConstantVector::get(Mask));
}
// If this insertelement isn't used by some other insertelement, turn it
@@ -8906,7 +8906,7 @@ Instruction *InstCombiner::visitInsertElementInst(InsertElementInst &IE) {
Value *LHS = CollectShuffleElements(&IE, Mask, RHS);
if (RHS == 0) RHS = UndefValue::get(LHS->getType());
// We now have a shuffle of LHS, RHS, Mask.
- return new ShuffleVectorInst(LHS, RHS, ConstantPacked::get(Mask));
+ return new ShuffleVectorInst(LHS, RHS, ConstantVector::get(Mask));
}
}
}
@@ -8947,7 +8947,7 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
else
Elts.push_back(ConstantInt::get(Type::Int32Ty, Mask[i]));
}
- SVI.setOperand(2, ConstantPacked::get(Elts));
+ SVI.setOperand(2, ConstantVector::get(Elts));
}
}
@@ -8975,7 +8975,7 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
}
SVI.setOperand(0, SVI.getOperand(1));
SVI.setOperand(1, UndefValue::get(RHS->getType()));
- SVI.setOperand(2, ConstantPacked::get(Elts));
+ SVI.setOperand(2, ConstantVector::get(Elts));
LHS = SVI.getOperand(0);
RHS = SVI.getOperand(1);
MadeChange = true;
@@ -9030,7 +9030,7 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
}
return new ShuffleVectorInst(LHSSVI->getOperand(0),
LHSSVI->getOperand(1),
- ConstantPacked::get(Elts));
+ ConstantVector::get(Elts));
}
}
}
diff --git a/lib/Transforms/Scalar/LowerPacked.cpp b/lib/Transforms/Scalar/LowerPacked.cpp
index 72307a1..d78f068 100644
--- a/lib/Transforms/Scalar/LowerPacked.cpp
+++ b/lib/Transforms/Scalar/LowerPacked.cpp
@@ -72,13 +72,13 @@ public:
/// @param EI the insertelement operator to convert
void visitInsertElementInst(InsertElementInst& IE);
- /// This function asserts if the instruction is a PackedType but
+ /// This function asserts if the instruction is a VectorType but
/// is handled by another function.
///
- /// @brief Asserts if PackedType instruction is not handled elsewhere.
+ /// @brief Asserts if VectorType instruction is not handled elsewhere.
/// @param I the unhandled instruction
void visitInstruction(Instruction &I) {
- if (isa<PackedType>(I.getType()))
+ if (isa<VectorType>(I.getType()))
cerr << "Unhandled Instruction with Packed ReturnType: " << I << '\n';
}
private:
@@ -150,8 +150,8 @@ void LowerPacked::setValues(Value* value,const std::vector<Value*>& values)
// the program.
std::vector<Value*>& LowerPacked::getValues(Value* value)
{
- assert(isa<PackedType>(value->getType()) &&
- "Value must be PackedType");
+ assert(isa<VectorType>(value->getType()) &&
+ "Value must be VectorType");
// reject further processing if this one has
// already been handled
@@ -161,7 +161,7 @@ std::vector<Value*>& LowerPacked::getValues(Value* value)
return it->second;
}
- if (ConstantPacked* CP = dyn_cast<ConstantPacked>(value)) {
+ if (ConstantVector* CP = dyn_cast<ConstantVector>(value)) {
// non-zero constant case
std::vector<Value*> results;
results.reserve(CP->getNumOperands());
@@ -174,7 +174,7 @@ std::vector<Value*>& LowerPacked::getValues(Value* value)
else if (ConstantAggregateZero* CAZ =
dyn_cast<ConstantAggregateZero>(value)) {
// zero constant
- const PackedType* PKT = cast<PackedType>(CAZ->getType());
+ const VectorType* PKT = cast<VectorType>(CAZ->getType());
std::vector<Value*> results;
results.reserve(PKT->getNumElements());
@@ -187,7 +187,7 @@ std::vector<Value*>& LowerPacked::getValues(Value* value)
}
else if (isa<Instruction>(value)) {
// foward reference
- const PackedType* PKT = cast<PackedType>(value->getType());
+ const VectorType* PKT = cast<VectorType>(value->getType());
std::vector<Value*> results;
results.reserve(PKT->getNumElements());
@@ -200,7 +200,7 @@ std::vector<Value*>& LowerPacked::getValues(Value* value)
else {
// we don't know what it is, and we are trying to retrieve
// a value for it
- assert(false && "Unhandled PackedType value");
+ assert(false && "Unhandled VectorType value");
abort();
}
}
@@ -208,7 +208,7 @@ std::vector<Value*>& LowerPacked::getValues(Value* value)
void LowerPacked::visitLoadInst(LoadInst& LI)
{
// Make sure what we are dealing with is a packed type
- if (const PackedType* PKT = dyn_cast<PackedType>(LI.getType())) {
+ if (const VectorType* PKT = dyn_cast<VectorType>(LI.getType())) {
// Initialization, Idx is needed for getelementptr needed later
std::vector<Value*> Idx(2);
Idx[0] = ConstantInt::get(Type::Int32Ty,0);
@@ -249,8 +249,8 @@ void LowerPacked::visitLoadInst(LoadInst& LI)
void LowerPacked::visitBinaryOperator(BinaryOperator& BO)
{
- // Make sure both operands are PackedTypes
- if (isa<PackedType>(BO.getOperand(0)->getType())) {
+ // Make sure both operands are VectorTypes
+ if (isa<VectorType>(BO.getOperand(0)->getType())) {
std::vector<Value*>& op0Vals = getValues(BO.getOperand(0));
std::vector<Value*>& op1Vals = getValues(BO.getOperand(1));
std::vector<Value*> result;
@@ -277,8 +277,8 @@ void LowerPacked::visitBinaryOperator(BinaryOperator& BO)
void LowerPacked::visitICmpInst(ICmpInst& IC)
{
- // Make sure both operands are PackedTypes
- if (isa<PackedType>(IC.getOperand(0)->getType())) {
+ // Make sure both operands are VectorTypes
+ if (isa<VectorType>(IC.getOperand(0)->getType())) {
std::vector<Value*>& op0Vals = getValues(IC.getOperand(0));
std::vector<Value*>& op1Vals = getValues(IC.getOperand(1));
std::vector<Value*> result;
@@ -306,8 +306,8 @@ void LowerPacked::visitICmpInst(ICmpInst& IC)
void LowerPacked::visitStoreInst(StoreInst& SI)
{
- if (const PackedType* PKT =
- dyn_cast<PackedType>(SI.getOperand(0)->getType())) {
+ if (const VectorType* PKT =
+ dyn_cast<VectorType>(SI.getOperand(0)->getType())) {
// We will need this for getelementptr
std::vector<Value*> Idx(2);
Idx[0] = ConstantInt::get(Type::Int32Ty,0);
@@ -343,8 +343,8 @@ void LowerPacked::visitStoreInst(StoreInst& SI)
void LowerPacked::visitSelectInst(SelectInst& SELI)
{
- // Make sure both operands are PackedTypes
- if (isa<PackedType>(SELI.getType())) {
+ // Make sure both operands are VectorTypes
+ if (isa<VectorType>(SELI.getType())) {
std::vector<Value*>& op0Vals = getValues(SELI.getTrueValue());
std::vector<Value*>& op1Vals = getValues(SELI.getFalseValue());
std::vector<Value*> result;
@@ -369,7 +369,7 @@ void LowerPacked::visitSelectInst(SelectInst& SELI)
void LowerPacked::visitExtractElementInst(ExtractElementInst& EI)
{
std::vector<Value*>& op0Vals = getValues(EI.getOperand(0));
- const PackedType *PTy = cast<PackedType>(EI.getOperand(0)->getType());
+ const VectorType *PTy = cast<VectorType>(EI.getOperand(0)->getType());
Value *op1 = EI.getOperand(1);
if (ConstantInt *C = dyn_cast<ConstantInt>(op1)) {
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index 2193777..e1dbb9b 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -752,7 +752,7 @@ void Reassociate::ReassociateBB(BasicBlock *BB) {
// Reject cases where it is pointless to do this.
if (!isa<BinaryOperator>(BI) || BI->getType()->isFloatingPoint() ||
- isa<PackedType>(BI->getType()))
+ isa<VectorType>(BI->getType()))
continue; // Floating point ops are not associative.
// If this is a subtract instruction which is not already in negate form,
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 78377e7..7209398 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -702,8 +702,8 @@ void SCCPSolver::visitBinaryOperator(Instruction &I) {
// Could annihilate value.
if (I.getOpcode() == Instruction::And)
markConstant(IV, &I, Constant::getNullValue(I.getType()));
- else if (const PackedType *PT = dyn_cast<PackedType>(I.getType()))
- markConstant(IV, &I, ConstantPacked::getAllOnesValue(PT));
+ else if (const VectorType *PT = dyn_cast<VectorType>(I.getType()))
+ markConstant(IV, &I, ConstantVector::getAllOnesValue(PT));
else
markConstant(IV, &I, ConstantInt::getAllOnesValue(I.getType()));
return;
@@ -1237,8 +1237,8 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) {
case Instruction::Or:
// undef | X -> -1. X could be -1.
- if (const PackedType *PTy = dyn_cast<PackedType>(ITy))
- markForcedConstant(LV, I, ConstantPacked::getAllOnesValue(PTy));
+ if (const VectorType *PTy = dyn_cast<VectorType>(ITy))
+ markForcedConstant(LV, I, ConstantVector::getAllOnesValue(PTy));
else
markForcedConstant(LV, I, ConstantInt::getAllOnesValue(ITy));
return true;
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index bd0cf74..480f2aa 100644
--- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -323,12 +323,12 @@ int SROA::isSafeUseOfAllocation(Instruction *User) {
//
// Scalar replacing *just* the outer index of the array is probably not
// going to be a win anyway, so just give up.
- for (++I; I != E && (isa<ArrayType>(*I) || isa<PackedType>(*I)); ++I) {
+ for (++I; I != E && (isa<ArrayType>(*I) || isa<VectorType>(*I)); ++I) {
uint64_t NumElements;
if (const ArrayType *SubArrayTy = dyn_cast<ArrayType>(*I))
NumElements = SubArrayTy->getNumElements();
else
- NumElements = cast<PackedType>(*I)->getNumElements();
+ NumElements = cast<VectorType>(*I)->getNumElements();
if (!isa<ConstantInt>(I.getOperand())) return 0;
if (cast<ConstantInt>(I.getOperand())->getZExtValue() >= NumElements)
@@ -440,7 +440,7 @@ void SROA::CanonicalizeAllocaUsers(AllocationInst *AI) {
static bool MergeInType(const Type *In, const Type *&Accum,
const TargetData &TD) {
// If this is our first type, just use it.
- const PackedType *PTy;
+ const VectorType *PTy;
if (Accum == Type::VoidTy || In == Accum) {
Accum = In;
} else if (In == Type::VoidTy) {
@@ -452,16 +452,16 @@ static bool MergeInType(const Type *In, const Type *&Accum,
Accum = In;
} else if (isa<PointerType>(In) && isa<PointerType>(Accum)) {
// Pointer unions just stay as one of the pointers.
- } else if (isa<PackedType>(In) || isa<PackedType>(Accum)) {
- if ((PTy = dyn_cast<PackedType>(Accum)) &&
+ } else if (isa<VectorType>(In) || isa<VectorType>(Accum)) {
+ if ((PTy = dyn_cast<VectorType>(Accum)) &&
PTy->getElementType() == In) {
// Accum is a vector, and we are accessing an element: ok.
- } else if ((PTy = dyn_cast<PackedType>(In)) &&
+ } else if ((PTy = dyn_cast<VectorType>(In)) &&
PTy->getElementType() == Accum) {
// In is a vector, and accum is an element: ok, remember In.
Accum = In;
- } else if ((PTy = dyn_cast<PackedType>(In)) && isa<PackedType>(Accum) &&
- PTy->getBitWidth() == cast<PackedType>(Accum)->getBitWidth()) {
+ } else if ((PTy = dyn_cast<VectorType>(In)) && isa<VectorType>(Accum) &&
+ PTy->getBitWidth() == cast<VectorType>(Accum)->getBitWidth()) {
// Two vectors of the same size: keep Accum.
} else {
// Cannot insert an short into a <4 x int> or handle
@@ -561,7 +561,7 @@ const Type *SROA::CanConvertToScalar(Value *V, bool &IsNotTrivial) {
if (const ArrayType *ATy = dyn_cast<ArrayType>(AggTy)) {
if (Idx >= ATy->getNumElements()) return 0; // Out of range.
- } else if (const PackedType *PackedTy = dyn_cast<PackedType>(AggTy)) {
+ } else if (const VectorType *PackedTy = dyn_cast<VectorType>(AggTy)) {
// Getting an element of the packed vector.
if (Idx >= PackedTy->getNumElements()) return 0; // Out of range.
@@ -630,7 +630,7 @@ void SROA::ConvertToScalar(AllocationInst *AI, const Type *ActualTy) {
/// Offset is an offset from the original alloca, in bits that need to be
/// shifted to the right. By the end of this, there should be no uses of Ptr.
void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, unsigned Offset) {
- bool isVectorInsert = isa<PackedType>(NewAI->getType()->getElementType());
+ bool isVectorInsert = isa<VectorType>(NewAI->getType()->getElementType());
const TargetData &TD = getAnalysis<TargetData>();
while (!Ptr->use_empty()) {
Instruction *User = cast<Instruction>(Ptr->use_back());
@@ -639,10 +639,10 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, unsigned Offset) {
// The load is a bit extract from NewAI shifted right by Offset bits.
Value *NV = new LoadInst(NewAI, LI->getName(), LI);
if (NV->getType() != LI->getType()) {
- if (const PackedType *PTy = dyn_cast<PackedType>(NV->getType())) {
+ if (const VectorType *PTy = dyn_cast<VectorType>(NV->getType())) {
// If the result alloca is a packed type, this is either an element
// access or a bitcast to another packed type.
- if (isa<PackedType>(LI->getType())) {
+ if (isa<VectorType>(LI->getType())) {
NV = new BitCastInst(NV, LI->getType(), LI->getName(), LI);
} else {
// Must be an element access.
@@ -702,10 +702,10 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, unsigned Offset) {
if (SV->getType() != AllocaType) {
Value *Old = new LoadInst(NewAI, NewAI->getName()+".in", SI);
- if (const PackedType *PTy = dyn_cast<PackedType>(AllocaType)) {
+ if (const VectorType *PTy = dyn_cast<VectorType>(AllocaType)) {
// If the result alloca is a packed type, this is either an element
// access or a bitcast to another packed type.
- if (isa<PackedType>(SV->getType())) {
+ if (isa<VectorType>(SV->getType())) {
SV = new BitCastInst(SV, AllocaType, SV->getName(), SI);
} else {
// Must be an element insertion.
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp
index f90716c..fd68240 100644
--- a/lib/Transforms/Utils/ValueMapper.cpp
+++ b/lib/Transforms/Utils/ValueMapper.cpp
@@ -78,7 +78,7 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i)
Ops.push_back(cast<Constant>(MapValue(CE->getOperand(i), VM)));
return VM[V] = CE->getWithOperands(Ops);
- } else if (ConstantPacked *CP = dyn_cast<ConstantPacked>(C)) {
+ } else if (ConstantVector *CP = dyn_cast<ConstantVector>(C)) {
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) {
Value *MV = MapValue(CP->getOperand(i), VM);
if (MV != CP->getOperand(i)) {
@@ -92,7 +92,7 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
Values.push_back(cast<Constant>(MV));
for (++i; i != e; ++i)
Values.push_back(cast<Constant>(MapValue(CP->getOperand(i), VM)));
- return VM[V] = ConstantPacked::get(Values);
+ return VM[V] = ConstantVector::get(Values);
}
}
return VMSlot = C;
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index e834c53..fbe5f07 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -342,8 +342,8 @@ static void calcTypeName(const Type *Ty,
Result += "]";
break;
}
- case Type::PackedTyID: {
- const PackedType *PTy = cast<PackedType>(Ty);
+ case Type::VectorTyID: {
+ const VectorType *PTy = cast<VectorType>(Ty);
Result += "<" + utostr(PTy->getNumElements()) + " x ";
calcTypeName(PTy->getElementType(), TypeStack, TypeNames, Result);
Result += ">";
@@ -548,7 +548,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
Out << " }";
if (CS->getType()->isPacked())
Out << '>';
- } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(CV)) {
+ } else if (const ConstantVector *CP = dyn_cast<ConstantVector>(CV)) {
const Type *ETy = CP->getType()->getElementType();
assert(CP->getNumOperands() > 0 &&
"Number of operands for a PackedConst must be > 0");
@@ -772,7 +772,7 @@ std::ostream &AssemblyWriter::printTypeAtLeastOneLevel(const Type *Ty) {
} else if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
Out << '[' << ATy->getNumElements() << " x ";
printType(ATy->getElementType()) << ']';
- } else if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) {
+ } else if (const VectorType *PTy = dyn_cast<VectorType>(Ty)) {
Out << '<' << PTy->getNumElements() << " x ";
printType(PTy->getElementType()) << '>';
}
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index a540f4e..35a0eab 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -35,11 +35,11 @@ using namespace llvm;
// ConstantFold*Instruction Implementations
//===----------------------------------------------------------------------===//
-/// CastConstantPacked - Convert the specified ConstantPacked node to the
+/// CastConstantVector - Convert the specified ConstantVector node to the
/// specified packed type. At this point, we know that the elements of the
/// input packed constant are all simple integer or FP values.
-static Constant *CastConstantPacked(ConstantPacked *CP,
- const PackedType *DstTy) {
+static Constant *CastConstantVector(ConstantVector *CP,
+ const VectorType *DstTy) {
unsigned SrcNumElts = CP->getType()->getNumElements();
unsigned DstNumElts = DstTy->getNumElements();
const Type *SrcEltTy = CP->getType()->getElementType();
@@ -57,7 +57,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
for (unsigned i = 0; i != SrcNumElts; ++i)
Result.push_back(
ConstantExpr::getBitCast(CP->getOperand(i), DstEltTy));
- return ConstantPacked::get(Result);
+ return ConstantVector::get(Result);
}
// If this is an int-to-fp cast ..
@@ -70,7 +70,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
BitsToDouble(cast<ConstantInt>(CP->getOperand(i))->getZExtValue());
Result.push_back(ConstantFP::get(Type::DoubleTy, V));
}
- return ConstantPacked::get(Result);
+ return ConstantVector::get(Result);
}
assert(DstEltTy == Type::FloatTy && "Unknown fp type!");
for (unsigned i = 0; i != SrcNumElts; ++i) {
@@ -78,7 +78,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
BitsToFloat(cast<ConstantInt>(CP->getOperand(i))->getZExtValue());
Result.push_back(ConstantFP::get(Type::FloatTy, V));
}
- return ConstantPacked::get(Result);
+ return ConstantVector::get(Result);
}
// Otherwise, this is an fp-to-int cast.
@@ -91,7 +91,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
Constant *C = ConstantInt::get(Type::Int64Ty, V);
Result.push_back(ConstantExpr::getBitCast(C, DstEltTy ));
}
- return ConstantPacked::get(Result);
+ return ConstantVector::get(Result);
}
assert(SrcEltTy->getTypeID() == Type::FloatTyID);
@@ -100,7 +100,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
Constant *C = ConstantInt::get(Type::Int32Ty, V);
Result.push_back(ConstantExpr::getBitCast(C, DstEltTy));
}
- return ConstantPacked::get(Result);
+ return ConstantVector::get(Result);
}
// Otherwise, this is a cast that changes element count and size. Handle
@@ -242,8 +242,8 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V,
// Handle casts from one packed constant to another. We know that the src
// and dest type have the same size (otherwise its an illegal cast).
- if (const PackedType *DestPTy = dyn_cast<PackedType>(DestTy)) {
- if (const PackedType *SrcTy = dyn_cast<PackedType>(V->getType())) {
+ if (const VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) {
+ if (const VectorType *SrcTy = dyn_cast<VectorType>(V->getType())) {
assert(DestPTy->getBitWidth() == SrcTy->getBitWidth() &&
"Not cast between same sized vectors!");
// First, check for null and undef
@@ -252,9 +252,9 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V,
if (isa<UndefValue>(V))
return UndefValue::get(DestTy);
- if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(V)) {
- // This is a cast from a ConstantPacked of one type to a
- // ConstantPacked of another type. Check to see if all elements of
+ if (const ConstantVector *CP = dyn_cast<ConstantVector>(V)) {
+ // This is a cast from a ConstantVector of one type to a
+ // ConstantVector of another type. Check to see if all elements of
// the input are simple.
bool AllSimpleConstants = true;
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) {
@@ -267,7 +267,7 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V,
// If all of the elements are simple constants, we can fold this.
if (AllSimpleConstants)
- return CastConstantPacked(const_cast<ConstantPacked*>(CP), DestPTy);
+ return CastConstantVector(const_cast<ConstantVector*>(CP), DestPTy);
}
}
}
@@ -329,12 +329,12 @@ Constant *llvm::ConstantFoldSelectInstruction(const Constant *Cond,
Constant *llvm::ConstantFoldExtractElementInstruction(const Constant *Val,
const Constant *Idx) {
if (isa<UndefValue>(Val)) // ee(undef, x) -> undef
- return UndefValue::get(cast<PackedType>(Val->getType())->getElementType());
+ return UndefValue::get(cast<VectorType>(Val->getType())->getElementType());
if (Val->isNullValue()) // ee(zero, x) -> zero
return Constant::getNullValue(
- cast<PackedType>(Val->getType())->getElementType());
+ cast<VectorType>(Val->getType())->getElementType());
- if (const ConstantPacked *CVal = dyn_cast<ConstantPacked>(Val)) {
+ if (const ConstantVector *CVal = dyn_cast<ConstantVector>(Val)) {
if (const ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx)) {
return const_cast<Constant*>(CVal->getOperand(CIdx->getZExtValue()));
} else if (isa<UndefValue>(Idx)) {
@@ -359,7 +359,7 @@ Constant *llvm::ConstantFoldInsertElementInstruction(const Constant *Val,
// Otherwise break the aggregate undef into multiple undefs and do
// the insertion
unsigned numOps =
- cast<PackedType>(Val->getType())->getNumElements();
+ cast<VectorType>(Val->getType())->getNumElements();
std::vector<Constant*> Ops;
Ops.reserve(numOps);
for (unsigned i = 0; i < numOps; ++i) {
@@ -367,7 +367,7 @@ Constant *llvm::ConstantFoldInsertElementInstruction(const Constant *Val,
(i == idxVal) ? Elt : UndefValue::get(Elt->getType());
Ops.push_back(const_cast<Constant*>(Op));
}
- return ConstantPacked::get(Ops);
+ return ConstantVector::get(Ops);
}
if (isa<ConstantAggregateZero>(Val)) {
// Insertion of scalar constant into packed aggregate zero
@@ -377,7 +377,7 @@ Constant *llvm::ConstantFoldInsertElementInstruction(const Constant *Val,
// Otherwise break the aggregate zero into multiple zeros and do
// the insertion
unsigned numOps =
- cast<PackedType>(Val->getType())->getNumElements();
+ cast<VectorType>(Val->getType())->getNumElements();
std::vector<Constant*> Ops;
Ops.reserve(numOps);
for (unsigned i = 0; i < numOps; ++i) {
@@ -385,9 +385,9 @@ Constant *llvm::ConstantFoldInsertElementInstruction(const Constant *Val,
(i == idxVal) ? Elt : Constant::getNullValue(Elt->getType());
Ops.push_back(const_cast<Constant*>(Op));
}
- return ConstantPacked::get(Ops);
+ return ConstantVector::get(Ops);
}
- if (const ConstantPacked *CVal = dyn_cast<ConstantPacked>(Val)) {
+ if (const ConstantVector *CVal = dyn_cast<ConstantVector>(Val)) {
// Insertion of scalar constant into packed constant
std::vector<Constant*> Ops;
Ops.reserve(CVal->getNumOperands());
@@ -396,7 +396,7 @@ Constant *llvm::ConstantFoldInsertElementInstruction(const Constant *Val,
(i == idxVal) ? Elt : cast<Constant>(CVal->getOperand(i));
Ops.push_back(const_cast<Constant*>(Op));
}
- return ConstantPacked::get(Ops);
+ return ConstantVector::get(Ops);
}
return 0;
}
@@ -409,16 +409,16 @@ Constant *llvm::ConstantFoldShuffleVectorInstruction(const Constant *V1,
}
/// EvalVectorOp - Given two packed constants and a function pointer, apply the
-/// function pointer to each element pair, producing a new ConstantPacked
+/// function pointer to each element pair, producing a new ConstantVector
/// constant.
-static Constant *EvalVectorOp(const ConstantPacked *V1,
- const ConstantPacked *V2,
+static Constant *EvalVectorOp(const ConstantVector *V1,
+ const ConstantVector *V2,
Constant *(*FP)(Constant*, Constant*)) {
std::vector<Constant*> Res;
for (unsigned i = 0, e = V1->getNumOperands(); i != e; ++i)
Res.push_back(FP(const_cast<Constant*>(V1->getOperand(i)),
const_cast<Constant*>(V2->getOperand(i))));
- return ConstantPacked::get(Res);
+ return ConstantVector::get(Res);
}
Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
@@ -444,8 +444,8 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
return Constant::getNullValue(C1->getType());
return const_cast<Constant*>(C2); // X / undef -> undef
case Instruction::Or: // X | undef -> -1
- if (const PackedType *PTy = dyn_cast<PackedType>(C1->getType()))
- return ConstantPacked::getAllOnesValue(PTy);
+ if (const VectorType *PTy = dyn_cast<VectorType>(C1->getType()))
+ return ConstantVector::getAllOnesValue(PTy);
return ConstantInt::getAllOnesValue(C1->getType());
case Instruction::LShr:
if (isa<UndefValue>(C2) && isa<UndefValue>(C1))
@@ -632,8 +632,8 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
return ConstantFP::get(CFP1->getType(), std::fmod(C1Val, C2Val));
}
}
- } else if (const ConstantPacked *CP1 = dyn_cast<ConstantPacked>(C1)) {
- if (const ConstantPacked *CP2 = dyn_cast<ConstantPacked>(C2)) {
+ } else if (const ConstantVector *CP1 = dyn_cast<ConstantVector>(C1)) {
+ if (const ConstantVector *CP2 = dyn_cast<ConstantVector>(C2)) {
switch (Opcode) {
default:
break;
@@ -1115,8 +1115,8 @@ Constant *llvm::ConstantFoldCompareInstruction(unsigned short pred,
case FCmpInst::FCMP_OGE:
return ConstantInt::get(Type::Int1Ty, C1Val >= C2Val);
}
- } else if (const ConstantPacked *CP1 = dyn_cast<ConstantPacked>(C1)) {
- if (const ConstantPacked *CP2 = dyn_cast<ConstantPacked>(C2)) {
+ } else if (const ConstantVector *CP1 = dyn_cast<ConstantVector>(C1)) {
+ if (const ConstantVector *CP2 = dyn_cast<ConstantVector>(C2)) {
if (pred == FCmpInst::FCMP_OEQ || pred == FCmpInst::FCMP_UEQ) {
for (unsigned i = 0, e = CP1->getNumOperands(); i != e; ++i) {
Constant *C= ConstantExpr::getFCmp(FCmpInst::FCMP_OEQ,
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index 5134495..992159f 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -131,7 +131,7 @@ Constant *Constant::getNullValue(const Type *Ty) {
return ConstantPointerNull::get(cast<PointerType>(Ty));
case Type::StructTyID:
case Type::ArrayTyID:
- case Type::PackedTyID:
+ case Type::VectorTyID:
return ConstantAggregateZero::get(Ty);
default:
// Function, Label, or Opaque type?
@@ -154,12 +154,12 @@ ConstantInt *ConstantInt::getAllOnesValue(const Type *Ty) {
/// @returns the value for an packed integer constant of the given type that
/// has all its bits set to true.
/// @brief Get the all ones value
-ConstantPacked *ConstantPacked::getAllOnesValue(const PackedType *Ty) {
+ConstantVector *ConstantVector::getAllOnesValue(const VectorType *Ty) {
std::vector<Constant*> Elts;
Elts.resize(Ty->getNumElements(),
ConstantInt::getAllOnesValue(Ty->getElementType()));
assert(Elts[0] && "Not a packed integer type!");
- return cast<ConstantPacked>(ConstantPacked::get(Elts));
+ return cast<ConstantVector>(ConstantVector::get(Elts));
}
@@ -229,9 +229,9 @@ ConstantStruct::~ConstantStruct() {
}
-ConstantPacked::ConstantPacked(const PackedType *T,
+ConstantVector::ConstantVector(const VectorType *T,
const std::vector<Constant*> &V)
- : Constant(T, ConstantPackedVal, new Use[V.size()], V.size()) {
+ : Constant(T, ConstantVectorVal, new Use[V.size()], V.size()) {
Use *OL = OperandList;
for (std::vector<Constant*>::const_iterator I = V.begin(), E = V.end();
I != E; ++I, ++OL) {
@@ -244,7 +244,7 @@ ConstantPacked::ConstantPacked(const PackedType *T,
}
}
-ConstantPacked::~ConstantPacked() {
+ConstantVector::~ConstantVector() {
delete [] OperandList;
}
@@ -293,7 +293,7 @@ class VISIBILITY_HIDDEN ExtractElementConstantExpr : public ConstantExpr {
Use Ops[2];
public:
ExtractElementConstantExpr(Constant *C1, Constant *C2)
- : ConstantExpr(cast<PackedType>(C1->getType())->getElementType(),
+ : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(),
Instruction::ExtractElement, Ops, 2) {
Ops[0].init(C1, this);
Ops[1].init(C2, this);
@@ -919,7 +919,7 @@ static ManagedStatic<ValueMap<char, Type,
static char getValType(ConstantAggregateZero *CPZ) { return 0; }
Constant *ConstantAggregateZero::get(const Type *Ty) {
- assert((isa<StructType>(Ty) || isa<ArrayType>(Ty) || isa<PackedType>(Ty)) &&
+ assert((isa<StructType>(Ty) || isa<ArrayType>(Ty) || isa<VectorType>(Ty)) &&
"Cannot create an aggregate zero of non-aggregate type!");
return AggZeroConstants->getOrCreate(Ty, 0);
}
@@ -1108,17 +1108,17 @@ void ConstantStruct::destroyConstant() {
destroyConstantImpl();
}
-//---- ConstantPacked::get() implementation...
+//---- ConstantVector::get() implementation...
//
namespace llvm {
template<>
- struct ConvertConstantType<ConstantPacked, PackedType> {
- static void convert(ConstantPacked *OldC, const PackedType *NewTy) {
+ struct ConvertConstantType<ConstantVector, VectorType> {
+ static void convert(ConstantVector *OldC, const VectorType *NewTy) {
// Make everyone now use a constant of the new type...
std::vector<Constant*> C;
for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i)
C.push_back(cast<Constant>(OldC->getOperand(i)));
- Constant *New = ConstantPacked::get(NewTy, C);
+ Constant *New = ConstantVector::get(NewTy, C);
assert(New != OldC && "Didn't replace constant??");
OldC->uncheckedReplaceAllUsesWith(New);
OldC->destroyConstant(); // This constant is now dead, destroy it.
@@ -1126,7 +1126,7 @@ namespace llvm {
};
}
-static std::vector<Constant*> getValType(ConstantPacked *CP) {
+static std::vector<Constant*> getValType(ConstantVector *CP) {
std::vector<Constant*> Elements;
Elements.reserve(CP->getNumOperands());
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
@@ -1134,10 +1134,10 @@ static std::vector<Constant*> getValType(ConstantPacked *CP) {
return Elements;
}
-static ManagedStatic<ValueMap<std::vector<Constant*>, PackedType,
- ConstantPacked> > PackedConstants;
+static ManagedStatic<ValueMap<std::vector<Constant*>, VectorType,
+ ConstantVector> > PackedConstants;
-Constant *ConstantPacked::get(const PackedType *Ty,
+Constant *ConstantVector::get(const VectorType *Ty,
const std::vector<Constant*> &V) {
// If this is an all-zero packed, return a ConstantAggregateZero object
if (!V.empty()) {
@@ -1151,14 +1151,14 @@ Constant *ConstantPacked::get(const PackedType *Ty,
return ConstantAggregateZero::get(Ty);
}
-Constant *ConstantPacked::get(const std::vector<Constant*> &V) {
+Constant *ConstantVector::get(const std::vector<Constant*> &V) {
assert(!V.empty() && "Cannot infer type if V is empty");
- return get(PackedType::get(V.front()->getType(),V.size()), V);
+ return get(VectorType::get(V.front()->getType(),V.size()), V);
}
// destroyConstant - Remove the constant from the constant table...
//
-void ConstantPacked::destroyConstant() {
+void ConstantVector::destroyConstant() {
PackedConstants->remove(this);
destroyConstantImpl();
}
@@ -1167,7 +1167,7 @@ void ConstantPacked::destroyConstant() {
/// is set to all ones.
/// @returns true iff this constant's emements are all set to all ones.
/// @brief Determine if the value is all ones.
-bool ConstantPacked::isAllOnesValue() const {
+bool ConstantVector::isAllOnesValue() const {
// Check out first element.
const Constant *Elt = getOperand(0);
const ConstantInt *CI = dyn_cast<ConstantInt>(Elt);
@@ -1635,40 +1635,40 @@ Constant *ConstantExpr::get(unsigned Opcode, Constant *C1, Constant *C2) {
case Instruction::Mul:
assert(C1->getType() == C2->getType() && "Op types should be identical!");
assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint() ||
- isa<PackedType>(C1->getType())) &&
+ isa<VectorType>(C1->getType())) &&
"Tried to create an arithmetic operation on a non-arithmetic type!");
break;
case Instruction::UDiv:
case Instruction::SDiv:
assert(C1->getType() == C2->getType() && "Op types should be identical!");
- assert((C1->getType()->isInteger() || (isa<PackedType>(C1->getType()) &&
- cast<PackedType>(C1->getType())->getElementType()->isInteger())) &&
+ assert((C1->getType()->isInteger() || (isa<VectorType>(C1->getType()) &&
+ cast<VectorType>(C1->getType())->getElementType()->isInteger())) &&
"Tried to create an arithmetic operation on a non-arithmetic type!");
break;
case Instruction::FDiv:
assert(C1->getType() == C2->getType() && "Op types should be identical!");
- assert((C1->getType()->isFloatingPoint() || (isa<PackedType>(C1->getType())
- && cast<PackedType>(C1->getType())->getElementType()->isFloatingPoint()))
+ assert((C1->getType()->isFloatingPoint() || (isa<VectorType>(C1->getType())
+ && cast<VectorType>(C1->getType())->getElementType()->isFloatingPoint()))
&& "Tried to create an arithmetic operation on a non-arithmetic type!");
break;
case Instruction::URem:
case Instruction::SRem:
assert(C1->getType() == C2->getType() && "Op types should be identical!");
- assert((C1->getType()->isInteger() || (isa<PackedType>(C1->getType()) &&
- cast<PackedType>(C1->getType())->getElementType()->isInteger())) &&
+ assert((C1->getType()->isInteger() || (isa<VectorType>(C1->getType()) &&
+ cast<VectorType>(C1->getType())->getElementType()->isInteger())) &&
"Tried to create an arithmetic operation on a non-arithmetic type!");
break;
case Instruction::FRem:
assert(C1->getType() == C2->getType() && "Op types should be identical!");
- assert((C1->getType()->isFloatingPoint() || (isa<PackedType>(C1->getType())
- && cast<PackedType>(C1->getType())->getElementType()->isFloatingPoint()))
+ assert((C1->getType()->isFloatingPoint() || (isa<VectorType>(C1->getType())
+ && cast<VectorType>(C1->getType())->getElementType()->isFloatingPoint()))
&& "Tried to create an arithmetic operation on a non-arithmetic type!");
break;
case Instruction::And:
case Instruction::Or:
case Instruction::Xor:
assert(C1->getType() == C2->getType() && "Op types should be identical!");
- assert((C1->getType()->isInteger() || isa<PackedType>(C1->getType())) &&
+ assert((C1->getType()->isInteger() || isa<VectorType>(C1->getType())) &&
"Tried to create a logical operation on a non-integral type!");
break;
case Instruction::Shl:
@@ -1792,11 +1792,11 @@ Constant *ConstantExpr::getExtractElementTy(const Type *ReqTy, Constant *Val,
}
Constant *ConstantExpr::getExtractElement(Constant *Val, Constant *Idx) {
- assert(isa<PackedType>(Val->getType()) &&
+ assert(isa<VectorType>(Val->getType()) &&
"Tried to create extractelement operation on non-packed type!");
assert(Idx->getType() == Type::Int32Ty &&
"Extractelement index must be i32 type!");
- return getExtractElementTy(cast<PackedType>(Val->getType())->getElementType(),
+ return getExtractElementTy(cast<VectorType>(Val->getType())->getElementType(),
Val, Idx);
}
@@ -1814,13 +1814,13 @@ Constant *ConstantExpr::getInsertElementTy(const Type *ReqTy, Constant *Val,
Constant *ConstantExpr::getInsertElement(Constant *Val, Constant *Elt,
Constant *Idx) {
- assert(isa<PackedType>(Val->getType()) &&
+ assert(isa<VectorType>(Val->getType()) &&
"Tried to create insertelement operation on non-packed type!");
- assert(Elt->getType() == cast<PackedType>(Val->getType())->getElementType()
+ assert(Elt->getType() == cast<VectorType>(Val->getType())->getElementType()
&& "Insertelement types must match!");
assert(Idx->getType() == Type::Int32Ty &&
"Insertelement index must be i32 type!");
- return getInsertElementTy(cast<PackedType>(Val->getType())->getElementType(),
+ return getInsertElementTy(cast<VectorType>(Val->getType())->getElementType(),
Val, Elt, Idx);
}
@@ -1844,11 +1844,11 @@ Constant *ConstantExpr::getShuffleVector(Constant *V1, Constant *V2,
}
Constant *ConstantExpr::getZeroValueForNegationExpr(const Type *Ty) {
- if (const PackedType *PTy = dyn_cast<PackedType>(Ty))
+ if (const VectorType *PTy = dyn_cast<VectorType>(Ty))
if (PTy->getElementType()->isFloatingPoint()) {
std::vector<Constant*> zeros(PTy->getNumElements(),
ConstantFP::get(PTy->getElementType(),-0.0));
- return ConstantPacked::get(PTy, zeros);
+ return ConstantVector::get(PTy, zeros);
}
if (Ty->isFloatingPoint())
@@ -2000,7 +2000,7 @@ void ConstantStruct::replaceUsesOfWithOnConstant(Value *From, Value *To,
destroyConstant();
}
-void ConstantPacked::replaceUsesOfWithOnConstant(Value *From, Value *To,
+void ConstantVector::replaceUsesOfWithOnConstant(Value *From, Value *To,
Use *U) {
assert(isa<Constant>(To) && "Cannot make Constant refer to non-constant!");
@@ -2012,7 +2012,7 @@ void ConstantPacked::replaceUsesOfWithOnConstant(Value *From, Value *To,
Values.push_back(Val);
}
- Constant *Replacement = ConstantPacked::get(getType(), Values);
+ Constant *Replacement = ConstantVector::get(getType(), Values);
assert(Replacement != this && "I didn't contain From!");
// Everyone using this now uses the replacement.
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 916cf73..e591845 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -884,7 +884,7 @@ const Type* GetElementPtrInst::getIndexedType(const Type *Ptr, Value *Idx) {
ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
const std::string &Name,
Instruction *InsertBef)
- : Instruction(cast<PackedType>(Val->getType())->getElementType(),
+ : Instruction(cast<VectorType>(Val->getType())->getElementType(),
ExtractElement, Ops, 2, Name, InsertBef) {
assert(isValidOperands(Val, Index) &&
"Invalid extractelement instruction operands!");
@@ -895,7 +895,7 @@ ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
ExtractElementInst::ExtractElementInst(Value *Val, unsigned IndexV,
const std::string &Name,
Instruction *InsertBef)
- : Instruction(cast<PackedType>(Val->getType())->getElementType(),
+ : Instruction(cast<VectorType>(Val->getType())->getElementType(),
ExtractElement, Ops, 2, Name, InsertBef) {
Constant *Index = ConstantInt::get(Type::Int32Ty, IndexV);
assert(isValidOperands(Val, Index) &&
@@ -908,7 +908,7 @@ ExtractElementInst::ExtractElementInst(Value *Val, unsigned IndexV,
ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
const std::string &Name,
BasicBlock *InsertAE)
- : Instruction(cast<PackedType>(Val->getType())->getElementType(),
+ : Instruction(cast<VectorType>(Val->getType())->getElementType(),
ExtractElement, Ops, 2, Name, InsertAE) {
assert(isValidOperands(Val, Index) &&
"Invalid extractelement instruction operands!");
@@ -920,7 +920,7 @@ ExtractElementInst::ExtractElementInst(Value *Val, Value *Index,
ExtractElementInst::ExtractElementInst(Value *Val, unsigned IndexV,
const std::string &Name,
BasicBlock *InsertAE)
- : Instruction(cast<PackedType>(Val->getType())->getElementType(),
+ : Instruction(cast<VectorType>(Val->getType())->getElementType(),
ExtractElement, Ops, 2, Name, InsertAE) {
Constant *Index = ConstantInt::get(Type::Int32Ty, IndexV);
assert(isValidOperands(Val, Index) &&
@@ -932,7 +932,7 @@ ExtractElementInst::ExtractElementInst(Value *Val, unsigned IndexV,
bool ExtractElementInst::isValidOperands(const Value *Val, const Value *Index) {
- if (!isa<PackedType>(Val->getType()) || Index->getType() != Type::Int32Ty)
+ if (!isa<VectorType>(Val->getType()) || Index->getType() != Type::Int32Ty)
return false;
return true;
}
@@ -999,10 +999,10 @@ InsertElementInst::InsertElementInst(Value *Vec, Value *Elt, unsigned IndexV,
bool InsertElementInst::isValidOperands(const Value *Vec, const Value *Elt,
const Value *Index) {
- if (!isa<PackedType>(Vec->getType()))
+ if (!isa<VectorType>(Vec->getType()))
return false; // First operand of insertelement must be packed type.
- if (Elt->getType() != cast<PackedType>(Vec->getType())->getElementType())
+ if (Elt->getType() != cast<VectorType>(Vec->getType())->getElementType())
return false;// Second operand of insertelement must be packed element type.
if (Index->getType() != Type::Int32Ty)
@@ -1047,12 +1047,12 @@ ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value *Mask,
bool ShuffleVectorInst::isValidOperands(const Value *V1, const Value *V2,
const Value *Mask) {
- if (!isa<PackedType>(V1->getType())) return false;
+ if (!isa<VectorType>(V1->getType())) return false;
if (V1->getType() != V2->getType()) return false;
- if (!isa<PackedType>(Mask->getType()) ||
- cast<PackedType>(Mask->getType())->getElementType() != Type::Int32Ty ||
- cast<PackedType>(Mask->getType())->getNumElements() !=
- cast<PackedType>(V1->getType())->getNumElements())
+ if (!isa<VectorType>(Mask->getType()) ||
+ cast<VectorType>(Mask->getType())->getElementType() != Type::Int32Ty ||
+ cast<VectorType>(Mask->getType())->getNumElements() !=
+ cast<VectorType>(V1->getType())->getNumElements())
return false;
return true;
}
@@ -1075,37 +1075,37 @@ void BinaryOperator::init(BinaryOps iType)
assert(getType() == LHS->getType() &&
"Arithmetic operation should return same type as operands!");
assert((getType()->isInteger() || getType()->isFloatingPoint() ||
- isa<PackedType>(getType())) &&
+ isa<VectorType>(getType())) &&
"Tried to create an arithmetic operation on a non-arithmetic type!");
break;
case UDiv:
case SDiv:
assert(getType() == LHS->getType() &&
"Arithmetic operation should return same type as operands!");
- assert((getType()->isInteger() || (isa<PackedType>(getType()) &&
- cast<PackedType>(getType())->getElementType()->isInteger())) &&
+ assert((getType()->isInteger() || (isa<VectorType>(getType()) &&
+ cast<VectorType>(getType())->getElementType()->isInteger())) &&
"Incorrect operand type (not integer) for S/UDIV");
break;
case FDiv:
assert(getType() == LHS->getType() &&
"Arithmetic operation should return same type as operands!");
- assert((getType()->isFloatingPoint() || (isa<PackedType>(getType()) &&
- cast<PackedType>(getType())->getElementType()->isFloatingPoint()))
+ assert((getType()->isFloatingPoint() || (isa<VectorType>(getType()) &&
+ cast<VectorType>(getType())->getElementType()->isFloatingPoint()))
&& "Incorrect operand type (not floating point) for FDIV");
break;
case URem:
case SRem:
assert(getType() == LHS->getType() &&
"Arithmetic operation should return same type as operands!");
- assert((getType()->isInteger() || (isa<PackedType>(getType()) &&
- cast<PackedType>(getType())->getElementType()->isInteger())) &&
+ assert((getType()->isInteger() || (isa<VectorType>(getType()) &&
+ cast<VectorType>(getType())->getElementType()->isInteger())) &&
"Incorrect operand type (not integer) for S/UREM");
break;
case FRem:
assert(getType() == LHS->getType() &&
"Arithmetic operation should return same type as operands!");
- assert((getType()->isFloatingPoint() || (isa<PackedType>(getType()) &&
- cast<PackedType>(getType())->getElementType()->isFloatingPoint()))
+ assert((getType()->isFloatingPoint() || (isa<VectorType>(getType()) &&
+ cast<VectorType>(getType())->getElementType()->isFloatingPoint()))
&& "Incorrect operand type (not floating point) for FREM");
break;
case Shl:
@@ -1121,8 +1121,8 @@ void BinaryOperator::init(BinaryOps iType)
assert(getType() == LHS->getType() &&
"Logical operation should return same type as operands!");
assert((getType()->isInteger() ||
- (isa<PackedType>(getType()) &&
- cast<PackedType>(getType())->getElementType()->isInteger())) &&
+ (isa<VectorType>(getType()) &&
+ cast<VectorType>(getType())->getElementType()->isInteger())) &&
"Tried to create a logical operation on a non-integral type!");
break;
default:
@@ -1166,9 +1166,9 @@ BinaryOperator *BinaryOperator::createNeg(Value *Op, const std::string &Name,
BinaryOperator *BinaryOperator::createNot(Value *Op, const std::string &Name,
Instruction *InsertBefore) {
Constant *C;
- if (const PackedType *PTy = dyn_cast<PackedType>(Op->getType())) {
+ if (const VectorType *PTy = dyn_cast<VectorType>(Op->getType())) {
C = ConstantInt::getAllOnesValue(PTy->getElementType());
- C = ConstantPacked::get(std::vector<Constant*>(PTy->getNumElements(), C));
+ C = ConstantVector::get(std::vector<Constant*>(PTy->getNumElements(), C));
} else {
C = ConstantInt::getAllOnesValue(Op->getType());
}
@@ -1180,11 +1180,11 @@ BinaryOperator *BinaryOperator::createNot(Value *Op, const std::string &Name,
BinaryOperator *BinaryOperator::createNot(Value *Op, const std::string &Name,
BasicBlock *InsertAtEnd) {
Constant *AllOnes;
- if (const PackedType *PTy = dyn_cast<PackedType>(Op->getType())) {
+ if (const VectorType *PTy = dyn_cast<VectorType>(Op->getType())) {
// Create a vector of all ones values.
Constant *Elt = ConstantInt::getAllOnesValue(PTy->getElementType());
AllOnes =
- ConstantPacked::get(std::vector<Constant*>(PTy->getNumElements(), Elt));
+ ConstantVector::get(std::vector<Constant*>(PTy->getNumElements(), Elt));
} else {
AllOnes = ConstantInt::getAllOnesValue(Op->getType());
}
@@ -1680,7 +1680,7 @@ CastInst::getCastOpcode(
return FPToSI; // FP -> sint
else
return FPToUI; // FP -> uint
- } else if (const PackedType *PTy = dyn_cast<PackedType>(SrcTy)) {
+ } else if (const VectorType *PTy = dyn_cast<VectorType>(SrcTy)) {
assert(DestBits == PTy->getBitWidth() &&
"Casting packed to integer of different width");
return BitCast; // Same size, no-op cast
@@ -1703,15 +1703,15 @@ CastInst::getCastOpcode(
} else {
return BitCast; // same size, no-op cast
}
- } else if (const PackedType *PTy = dyn_cast<PackedType>(SrcTy)) {
+ } else if (const VectorType *PTy = dyn_cast<VectorType>(SrcTy)) {
assert(DestBits == PTy->getBitWidth() &&
"Casting packed to floating point of different width");
return BitCast; // same size, no-op cast
} else {
assert(0 && "Casting pointer or non-first class to float");
}
- } else if (const PackedType *DestPTy = dyn_cast<PackedType>(DestTy)) {
- if (const PackedType *SrcPTy = dyn_cast<PackedType>(SrcTy)) {
+ } else if (const VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) {
+ if (const VectorType *SrcPTy = dyn_cast<VectorType>(SrcTy)) {
assert(DestPTy->getBitWidth() == SrcPTy->getBitWidth() &&
"Casting packed to packed of different widths");
return BitCast; // packed -> packed
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 1f843a2..ad0850b 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -93,9 +93,9 @@ const Type *Type::getVAArgsPromotedType() const {
///
bool Type::isFPOrFPVector() const {
if (ID == Type::FloatTyID || ID == Type::DoubleTyID) return true;
- if (ID != Type::PackedTyID) return false;
+ if (ID != Type::VectorTyID) return false;
- return cast<PackedType>(this)->getElementType()->isFloatingPoint();
+ return cast<VectorType>(this)->getElementType()->isFloatingPoint();
}
// canLosslesllyBitCastTo - Return true if this type can be converted to
@@ -112,8 +112,8 @@ bool Type::canLosslesslyBitCastTo(const Type *Ty) const {
// Packed -> Packed conversions are always lossless if the two packed types
// have the same size, otherwise not.
- if (const PackedType *thisPTy = dyn_cast<PackedType>(this))
- if (const PackedType *thatPTy = dyn_cast<PackedType>(Ty))
+ if (const VectorType *thisPTy = dyn_cast<VectorType>(this))
+ if (const VectorType *thatPTy = dyn_cast<VectorType>(Ty))
return thisPTy->getBitWidth() == thatPTy->getBitWidth();
// At this point we have only various mismatches of the first class types
@@ -129,7 +129,7 @@ unsigned Type::getPrimitiveSizeInBits() const {
case Type::FloatTyID: return 32;
case Type::DoubleTyID: return 64;
case Type::IntegerTyID: return cast<IntegerType>(this)->getBitWidth();
- case Type::PackedTyID: return cast<PackedType>(this)->getBitWidth();
+ case Type::VectorTyID: return cast<VectorType>(this)->getBitWidth();
default: return 0;
}
}
@@ -144,7 +144,7 @@ bool Type::isSizedDerivedType() const {
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
return ATy->getElementType()->isSized();
- if (const PackedType *PTy = dyn_cast<PackedType>(this))
+ if (const VectorType *PTy = dyn_cast<VectorType>(this))
return PTy->getElementType()->isSized();
if (!isa<StructType>(this))
@@ -287,8 +287,8 @@ static std::string getTypeDescription(const Type *Ty,
Result += getTypeDescription(ATy->getElementType(), TypeStack) + "]";
break;
}
- case Type::PackedTyID: {
- const PackedType *PTy = cast<PackedType>(Ty);
+ case Type::VectorTyID: {
+ const VectorType *PTy = cast<VectorType>(Ty);
unsigned NumElements = PTy->getNumElements();
Result = "<";
Result += utostr(NumElements) + " x ";
@@ -421,14 +421,14 @@ ArrayType::ArrayType(const Type *ElType, uint64_t NumEl)
setAbstract(ElType->isAbstract());
}
-PackedType::PackedType(const Type *ElType, unsigned NumEl)
- : SequentialType(PackedTyID, ElType) {
+VectorType::VectorType(const Type *ElType, unsigned NumEl)
+ : SequentialType(VectorTyID, ElType) {
NumElements = NumEl;
setAbstract(ElType->isAbstract());
- assert(NumEl > 0 && "NumEl of a PackedType must be greater than 0");
+ assert(NumEl > 0 && "NumEl of a VectorType must be greater than 0");
assert((ElType->isInteger() || ElType->isFloatingPoint() ||
isa<OpaqueType>(ElType)) &&
- "Elements of a PackedType must be a primitive type");
+ "Elements of a VectorType must be a primitive type");
}
@@ -589,8 +589,8 @@ static bool TypesEqual(const Type *Ty, const Type *Ty2,
const ArrayType *ATy2 = cast<ArrayType>(Ty2);
return ATy->getNumElements() == ATy2->getNumElements() &&
TypesEqual(ATy->getElementType(), ATy2->getElementType(), EqTypes);
- } else if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) {
- const PackedType *PTy2 = cast<PackedType>(Ty2);
+ } else if (const VectorType *PTy = dyn_cast<VectorType>(Ty)) {
+ const VectorType *PTy2 = cast<VectorType>(Ty2);
return PTy->getNumElements() == PTy2->getNumElements() &&
TypesEqual(PTy->getElementType(), PTy2->getElementType(), EqTypes);
} else if (const FunctionType *FTy = dyn_cast<FunctionType>(Ty)) {
@@ -695,8 +695,8 @@ static unsigned getSubElementHash(const Type *Ty) {
case Type::ArrayTyID:
HashVal ^= cast<ArrayType>(SubTy)->getNumElements();
break;
- case Type::PackedTyID:
- HashVal ^= cast<PackedType>(SubTy)->getNumElements();
+ case Type::VectorTyID:
+ HashVal ^= cast<VectorType>(SubTy)->getNumElements();
break;
case Type::StructTyID:
HashVal ^= cast<StructType>(SubTy)->getNumElements();
@@ -1132,39 +1132,39 @@ ArrayType *ArrayType::get(const Type *ElementType, uint64_t NumElements) {
// Packed Type Factory...
//
namespace llvm {
-class PackedValType {
+class VectorValType {
const Type *ValTy;
unsigned Size;
public:
- PackedValType(const Type *val, int sz) : ValTy(val), Size(sz) {}
+ VectorValType(const Type *val, int sz) : ValTy(val), Size(sz) {}
- static PackedValType get(const PackedType *PT) {
- return PackedValType(PT->getElementType(), PT->getNumElements());
+ static VectorValType get(const VectorType *PT) {
+ return VectorValType(PT->getElementType(), PT->getNumElements());
}
- static unsigned hashTypeStructure(const PackedType *PT) {
+ static unsigned hashTypeStructure(const VectorType *PT) {
return PT->getNumElements();
}
- inline bool operator<(const PackedValType &MTV) const {
+ inline bool operator<(const VectorValType &MTV) const {
if (Size < MTV.Size) return true;
return Size == MTV.Size && ValTy < MTV.ValTy;
}
};
}
-static ManagedStatic<TypeMap<PackedValType, PackedType> > PackedTypes;
+static ManagedStatic<TypeMap<VectorValType, VectorType> > VectorTypes;
-PackedType *PackedType::get(const Type *ElementType, unsigned NumElements) {
+VectorType *VectorType::get(const Type *ElementType, unsigned NumElements) {
assert(ElementType && "Can't get packed of null types!");
assert(isPowerOf2_32(NumElements) && "Vector length should be a power of 2!");
- PackedValType PVT(ElementType, NumElements);
- PackedType *PT = PackedTypes->get(PVT);
+ VectorValType PVT(ElementType, NumElements);
+ VectorType *PT = VectorTypes->get(PVT);
if (PT) return PT; // Found a match, return it!
// Value not found. Derive a new type!
- PackedTypes->add(PVT, PT = new PackedType(ElementType, NumElements));
+ VectorTypes->add(PVT, PT = new VectorType(ElementType, NumElements));
#ifdef DEBUG_MERGE_TYPES
DOUT << "Derived new type: " << *PT << "\n";
@@ -1429,13 +1429,13 @@ void ArrayType::typeBecameConcrete(const DerivedType *AbsTy) {
// concrete - this could potentially change us from an abstract type to a
// concrete type.
//
-void PackedType::refineAbstractType(const DerivedType *OldType,
+void VectorType::refineAbstractType(const DerivedType *OldType,
const Type *NewType) {
- PackedTypes->RefineAbstractType(this, OldType, NewType);
+ VectorTypes->RefineAbstractType(this, OldType, NewType);
}
-void PackedType::typeBecameConcrete(const DerivedType *AbsTy) {
- PackedTypes->TypeBecameConcrete(this, AbsTy);
+void VectorType::typeBecameConcrete(const DerivedType *AbsTy) {
+ VectorTypes->TypeBecameConcrete(this, AbsTy);
}
// refineAbstractType - Called when a contained type is found to be more
diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp
index 33029fd..f13245b 100644
--- a/lib/VMCore/ValueTypes.cpp
+++ b/lib/VMCore/ValueTypes.cpp
@@ -96,14 +96,14 @@ const Type *MVT::getTypeForValueType(MVT::ValueType VT) {
case MVT::i128: return IntegerType::get(128);
case MVT::f32: return Type::FloatTy;
case MVT::f64: return Type::DoubleTy;
- case MVT::v8i8: return PackedType::get(Type::Int8Ty, 8);
- case MVT::v4i16: return PackedType::get(Type::Int16Ty, 4);
- case MVT::v2i32: return PackedType::get(Type::Int32Ty, 2);
- case MVT::v16i8: return PackedType::get(Type::Int8Ty, 16);
- case MVT::v8i16: return PackedType::get(Type::Int16Ty, 8);
- case MVT::v4i32: return PackedType::get(Type::Int32Ty, 4);
- case MVT::v2i64: return PackedType::get(Type::Int64Ty, 2);
- case MVT::v4f32: return PackedType::get(Type::FloatTy, 4);
- case MVT::v2f64: return PackedType::get(Type::DoubleTy, 2);
+ case MVT::v8i8: return VectorType::get(Type::Int8Ty, 8);
+ case MVT::v4i16: return VectorType::get(Type::Int16Ty, 4);
+ case MVT::v2i32: return VectorType::get(Type::Int32Ty, 2);
+ case MVT::v16i8: return VectorType::get(Type::Int8Ty, 16);
+ case MVT::v8i16: return VectorType::get(Type::Int16Ty, 8);
+ case MVT::v4i32: return VectorType::get(Type::Int32Ty, 4);
+ case MVT::v2i64: return VectorType::get(Type::Int64Ty, 2);
+ case MVT::v4f32: return VectorType::get(Type::FloatTy, 4);
+ case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2);
}
}
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 91dd4198..484dfd1 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -698,8 +698,8 @@ void Verifier::visitBinaryOperator(BinaryOperator &B) {
case Instruction::Or:
case Instruction::Xor:
Assert1(B.getType()->isInteger() ||
- (isa<PackedType>(B.getType()) &&
- cast<PackedType>(B.getType())->getElementType()->isInteger()),
+ (isa<VectorType>(B.getType()) &&
+ cast<VectorType>(B.getType())->getElementType()->isInteger()),
"Logical operators only work with integral types!", &B);
Assert1(B.getType() == B.getOperand(0)->getType(),
"Logical operators must have same type for operands and result!",
@@ -719,7 +719,7 @@ void Verifier::visitBinaryOperator(BinaryOperator &B) {
"Arithmetic operators must have same type for operands and result!",
&B);
Assert1(B.getType()->isInteger() || B.getType()->isFloatingPoint() ||
- isa<PackedType>(B.getType()),
+ isa<VectorType>(B.getType()),
"Arithmetic operators must have integer, fp, or packed type!", &B);
break;
}
@@ -774,7 +774,7 @@ void Verifier::visitShuffleVectorInst(ShuffleVectorInst &SV) {
"Result of shufflevector must match first operand type!", &SV);
// Check to see if Mask is valid.
- if (const ConstantPacked *MV = dyn_cast<ConstantPacked>(SV.getOperand(2))) {
+ if (const ConstantVector *MV = dyn_cast<ConstantVector>(SV.getOperand(2))) {
for (unsigned i = 0, e = MV->getNumOperands(); i != e; ++i) {
Assert1(isa<ConstantInt>(MV->getOperand(i)) ||
isa<UndefValue>(MV->getOperand(i)),
@@ -1014,9 +1014,9 @@ void Verifier::VerifyIntrinsicPrototype(Function *F, ...) {
"incorrect integer width!" + bitmsg, F);
break;
}
- } else if (TypeID == Type::PackedTyID) {
+ } else if (TypeID == Type::VectorTyID) {
// If this is a packed argument, verify the number and type of elements.
- const PackedType *PTy = cast<PackedType>(Ty);
+ const VectorType *PTy = cast<VectorType>(Ty);
int ElemTy = va_arg(VA, int);
if (ElemTy != PTy->getElementType()->getTypeID()) {
CheckFailed("Intrinsic prototype has incorrect vector element type!",
diff --git a/test/Transforms/SCCP/2006-12-04-PackedType.ll b/test/Transforms/SCCP/2006-12-04-PackedType.ll
index 7942b65..579276c 100644
--- a/test/Transforms/SCCP/2006-12-04-PackedType.ll
+++ b/test/Transforms/SCCP/2006-12-04-PackedType.ll
@@ -1,5 +1,5 @@
-; Test PackedType handling by SCCP.
-; SCCP ignores PackedTypes until PR 1034 is fixed
+; Test VectorType handling by SCCP.
+; SCCP ignores VectorTypes until PR 1034 is fixed
;
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp
target datalayout = "E-p:32:32"
diff --git a/tools/llvm-upgrade/UpgradeParser.cpp.cvs b/tools/llvm-upgrade/UpgradeParser.cpp.cvs
index 5219e7f..22d5a9d 100644
--- a/tools/llvm-upgrade/UpgradeParser.cpp.cvs
+++ b/tools/llvm-upgrade/UpgradeParser.cpp.cvs
@@ -1,167 +1,376 @@
+/* A Bison parser, made by GNU Bison 2.1. */
-/* A Bison parser, made from /Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.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 Upgradeparse
-#define yylex Upgradelex
+#define yylex Upgradelex
#define yyerror Upgradeerror
-#define yylval Upgradelval
-#define yychar Upgradechar
+#define yylval Upgradelval
+#define yychar Upgradechar
#define yydebug Upgradedebug
#define yynerrs Upgradenerrs
-#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 DLLIMPORT 299
-#define DLLEXPORT 300
-#define EXTERN_WEAK 301
-#define OPAQUE 302
-#define NOT 303
-#define EXTERNAL 304
-#define TARGET 305
-#define TRIPLE 306
-#define ENDIAN 307
-#define POINTERSIZE 308
-#define LITTLE 309
-#define BIG 310
-#define ALIGN 311
-#define DEPLIBS 312
-#define CALL 313
-#define TAIL 314
-#define ASM_TOK 315
-#define MODULE 316
-#define SIDEEFFECT 317
-#define CC_TOK 318
-#define CCC_TOK 319
-#define CSRETCC_TOK 320
-#define FASTCC_TOK 321
-#define COLDCC_TOK 322
-#define X86_STDCALLCC_TOK 323
-#define X86_FASTCALLCC_TOK 324
-#define DATALAYOUT 325
-#define RET 326
-#define BR 327
-#define SWITCH 328
-#define INVOKE 329
-#define UNREACHABLE 330
-#define UNWIND 331
-#define EXCEPT 332
-#define ADD 333
-#define SUB 334
-#define MUL 335
-#define DIV 336
-#define UDIV 337
-#define SDIV 338
-#define FDIV 339
-#define REM 340
-#define UREM 341
-#define SREM 342
-#define FREM 343
-#define AND 344
-#define OR 345
-#define XOR 346
-#define SHL 347
-#define SHR 348
-#define ASHR 349
-#define LSHR 350
-#define SETLE 351
-#define SETGE 352
-#define SETLT 353
-#define SETGT 354
-#define SETEQ 355
-#define SETNE 356
-#define ICMP 357
-#define FCMP 358
-#define MALLOC 359
-#define ALLOCA 360
-#define FREE 361
-#define LOAD 362
-#define STORE 363
-#define GETELEMENTPTR 364
-#define PHI_TOK 365
-#define SELECT 366
-#define VAARG 367
-#define EXTRACTELEMENT 368
-#define INSERTELEMENT 369
-#define SHUFFLEVECTOR 370
-#define VAARG_old 371
-#define VANEXT_old 372
-#define EQ 373
-#define NE 374
-#define SLT 375
-#define SGT 376
-#define SLE 377
-#define SGE 378
-#define ULT 379
-#define UGT 380
-#define ULE 381
-#define UGE 382
-#define OEQ 383
-#define ONE 384
-#define OLT 385
-#define OGT 386
-#define OLE 387
-#define OGE 388
-#define ORD 389
-#define UNO 390
-#define UEQ 391
-#define UNE 392
-#define CAST 393
-#define TRUNC 394
-#define ZEXT 395
-#define SEXT 396
-#define FPTRUNC 397
-#define FPEXT 398
-#define FPTOUI 399
-#define FPTOSI 400
-#define UITOFP 401
-#define SITOFP 402
-#define PTRTOINT 403
-#define INTTOPTR 404
-#define BITCAST 405
-
-#line 14 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.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,
+ DLLIMPORT = 300,
+ DLLEXPORT = 301,
+ EXTERN_WEAK = 302,
+ OPAQUE = 303,
+ NOT = 304,
+ EXTERNAL = 305,
+ TARGET = 306,
+ TRIPLE = 307,
+ ENDIAN = 308,
+ POINTERSIZE = 309,
+ LITTLE = 310,
+ BIG = 311,
+ ALIGN = 312,
+ DEPLIBS = 313,
+ CALL = 314,
+ TAIL = 315,
+ ASM_TOK = 316,
+ MODULE = 317,
+ SIDEEFFECT = 318,
+ CC_TOK = 319,
+ CCC_TOK = 320,
+ CSRETCC_TOK = 321,
+ FASTCC_TOK = 322,
+ COLDCC_TOK = 323,
+ X86_STDCALLCC_TOK = 324,
+ X86_FASTCALLCC_TOK = 325,
+ DATALAYOUT = 326,
+ RET = 327,
+ BR = 328,
+ SWITCH = 329,
+ INVOKE = 330,
+ UNREACHABLE = 331,
+ UNWIND = 332,
+ EXCEPT = 333,
+ ADD = 334,
+ SUB = 335,
+ MUL = 336,
+ DIV = 337,
+ UDIV = 338,
+ SDIV = 339,
+ FDIV = 340,
+ REM = 341,
+ UREM = 342,
+ SREM = 343,
+ FREM = 344,
+ AND = 345,
+ OR = 346,
+ XOR = 347,
+ SHL = 348,
+ SHR = 349,
+ ASHR = 350,
+ LSHR = 351,
+ SETLE = 352,
+ SETGE = 353,
+ SETLT = 354,
+ SETGT = 355,
+ SETEQ = 356,
+ SETNE = 357,
+ ICMP = 358,
+ FCMP = 359,
+ MALLOC = 360,
+ ALLOCA = 361,
+ FREE = 362,
+ LOAD = 363,
+ STORE = 364,
+ GETELEMENTPTR = 365,
+ PHI_TOK = 366,
+ SELECT = 367,
+ VAARG = 368,
+ EXTRACTELEMENT = 369,
+ INSERTELEMENT = 370,
+ SHUFFLEVECTOR = 371,
+ VAARG_old = 372,
+ VANEXT_old = 373,
+ EQ = 374,
+ NE = 375,
+ SLT = 376,
+ SGT = 377,
+ SLE = 378,
+ SGE = 379,
+ ULT = 380,
+ UGT = 381,
+ ULE = 382,
+ UGE = 383,
+ OEQ = 384,
+ ONE = 385,
+ OLT = 386,
+ OGT = 387,
+ OLE = 388,
+ OGE = 389,
+ ORD = 390,
+ UNO = 391,
+ UEQ = 392,
+ UNE = 393,
+ CAST = 394,
+ TRUNC = 395,
+ ZEXT = 396,
+ SEXT = 397,
+ FPTRUNC = 398,
+ FPEXT = 399,
+ FPTOUI = 400,
+ FPTOSI = 401,
+ UITOFP = 402,
+ SITOFP = 403,
+ PTRTOINT = 404,
+ INTTOPTR = 405,
+ BITCAST = 406
+ };
+#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 DLLIMPORT 300
+#define DLLEXPORT 301
+#define EXTERN_WEAK 302
+#define OPAQUE 303
+#define NOT 304
+#define EXTERNAL 305
+#define TARGET 306
+#define TRIPLE 307
+#define ENDIAN 308
+#define POINTERSIZE 309
+#define LITTLE 310
+#define BIG 311
+#define ALIGN 312
+#define DEPLIBS 313
+#define CALL 314
+#define TAIL 315
+#define ASM_TOK 316
+#define MODULE 317
+#define SIDEEFFECT 318
+#define CC_TOK 319
+#define CCC_TOK 320
+#define CSRETCC_TOK 321
+#define FASTCC_TOK 322
+#define COLDCC_TOK 323
+#define X86_STDCALLCC_TOK 324
+#define X86_FASTCALLCC_TOK 325
+#define DATALAYOUT 326
+#define RET 327
+#define BR 328
+#define SWITCH 329
+#define INVOKE 330
+#define UNREACHABLE 331
+#define UNWIND 332
+#define EXCEPT 333
+#define ADD 334
+#define SUB 335
+#define MUL 336
+#define DIV 337
+#define UDIV 338
+#define SDIV 339
+#define FDIV 340
+#define REM 341
+#define UREM 342
+#define SREM 343
+#define FREM 344
+#define AND 345
+#define OR 346
+#define XOR 347
+#define SHL 348
+#define SHR 349
+#define ASHR 350
+#define LSHR 351
+#define SETLE 352
+#define SETGE 353
+#define SETLT 354
+#define SETGT 355
+#define SETEQ 356
+#define SETNE 357
+#define ICMP 358
+#define FCMP 359
+#define MALLOC 360
+#define ALLOCA 361
+#define FREE 362
+#define LOAD 363
+#define STORE 364
+#define GETELEMENTPTR 365
+#define PHI_TOK 366
+#define SELECT 367
+#define VAARG 368
+#define EXTRACTELEMENT 369
+#define INSERTELEMENT 370
+#define SHUFFLEVECTOR 371
+#define VAARG_old 372
+#define VANEXT_old 373
+#define EQ 374
+#define NE 375
+#define SLT 376
+#define SGT 377
+#define SLE 378
+#define SGE 379
+#define ULT 380
+#define UGT 381
+#define ULE 382
+#define UGE 383
+#define OEQ 384
+#define ONE 385
+#define OLT 386
+#define OGT 387
+#define OLE 388
+#define OGE 389
+#define ORD 390
+#define UNO 391
+#define UEQ 392
+#define UNE 393
+#define CAST 394
+#define TRUNC 395
+#define ZEXT 396
+#define SEXT 397
+#define FPTRUNC 398
+#define FPEXT 399
+#define FPTOUI 400
+#define FPTOSI 401
+#define UITOFP 402
+#define SITOFP 403
+#define PTRTOINT 404
+#define INTTOPTR 405
+#define BITCAST 406
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 14 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
#include "UpgradeInternals.h"
#include "llvm/CallingConv.h"
@@ -1149,7 +1358,7 @@ getBinaryOp(BinaryOps op, const Type *Ty, Signedness Sign) {
// This is an obsolete instruction so we must upgrade it based on the
// types of its operands.
bool isFP = Ty->isFloatingPoint();
- if (const PackedType* PTy = dyn_cast<PackedType>(Ty))
+ if (const VectorType* PTy = dyn_cast<VectorType>(Ty))
// If its a packed type we want to use the element type
isFP = PTy->getElementType()->isFloatingPoint();
if (isFP)
@@ -1165,7 +1374,7 @@ getBinaryOp(BinaryOps op, const Type *Ty, Signedness Sign) {
// This is an obsolete instruction so we must upgrade it based on the
// types of its operands.
bool isFP = Ty->isFloatingPoint();
- if (const PackedType* PTy = dyn_cast<PackedType>(Ty))
+ if (const VectorType* PTy = dyn_cast<VectorType>(Ty))
// If its a packed type we want to use the element type
isFP = PTy->getElementType()->isFloatingPoint();
// Select correct opcode
@@ -1601,8 +1810,28 @@ Module* UpgradeAssembly(const std::string &infile, std::istream& in,
using namespace llvm;
-#line 1454 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.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 1454 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
std::pair<llvm::PATypeInfo, char*> *ArgVal;
@@ -1643,1151 +1872,1620 @@ typedef union {
llvm::FCmpInst::Predicate FPred;
llvm::Module::Endianness Endianness;
} YYSTYPE;
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
+/* Line 196 of yacc.c. */
+#line 1877 "UpgradeParser.tab.c"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-#define YYFINAL 605
-#define YYFLAG -32768
-#define YYNTBASE 166
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 405 ? yytranslate[x] : 245)
-
-static const short 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, 155,
- 156, 164, 2, 153, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 160,
- 152, 161, 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,
- 157, 154, 159, 2, 2, 2, 2, 2, 165, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 158,
- 2, 2, 162, 2, 163, 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, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151
-};
+/* 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, 66, 68, 70, 72, 74, 76, 78,
- 80, 82, 84, 86, 88, 90, 92, 94, 96, 98,
- 100, 102, 104, 106, 108, 110, 112, 114, 116, 118,
- 120, 122, 124, 126, 128, 130, 132, 134, 136, 138,
- 140, 142, 144, 146, 148, 150, 152, 154, 156, 158,
- 161, 162, 164, 166, 168, 170, 172, 174, 176, 177,
- 178, 180, 182, 184, 186, 188, 190, 193, 194, 197,
- 198, 202, 205, 206, 208, 209, 213, 215, 218, 220,
- 222, 224, 226, 228, 230, 232, 234, 236, 238, 240,
- 242, 244, 246, 248, 250, 252, 254, 256, 258, 261,
- 266, 272, 278, 282, 285, 291, 296, 299, 301, 305,
- 307, 311, 313, 314, 319, 323, 327, 332, 337, 341,
- 348, 354, 357, 360, 363, 366, 369, 372, 375, 378,
- 381, 384, 391, 397, 406, 413, 420, 427, 435, 443,
- 450, 457, 466, 475, 479, 481, 483, 485, 487, 490,
- 493, 498, 501, 503, 508, 511, 516, 517, 525, 526,
- 534, 535, 543, 544, 552, 556, 561, 562, 564, 566,
- 568, 572, 576, 580, 584, 588, 592, 594, 595, 597,
- 599, 601, 602, 605, 609, 611, 613, 617, 619, 620,
- 629, 631, 633, 637, 639, 641, 644, 645, 647, 649,
- 650, 651, 657, 658, 660, 662, 664, 666, 668, 670,
- 672, 674, 676, 680, 682, 688, 690, 692, 694, 696,
- 699, 702, 705, 709, 712, 713, 715, 717, 719, 722,
- 725, 729, 739, 749, 758, 772, 774, 776, 783, 789,
- 792, 799, 807, 809, 813, 815, 816, 819, 821, 827,
- 833, 839, 846, 853, 856, 861, 866, 873, 878, 883,
- 888, 893, 900, 907, 910, 918, 920, 923, 924, 926,
- 927, 931, 938, 942, 949, 952, 957, 964
-};
-static const short yyrhs[] = { 5,
- 0, 6, 0, 3, 0, 4, 0, 79, 0, 80,
- 0, 81, 0, 82, 0, 83, 0, 84, 0, 85,
- 0, 86, 0, 87, 0, 88, 0, 89, 0, 90,
- 0, 91, 0, 92, 0, 97, 0, 98, 0, 99,
- 0, 100, 0, 101, 0, 102, 0, 119, 0, 120,
- 0, 121, 0, 122, 0, 123, 0, 124, 0, 125,
- 0, 126, 0, 127, 0, 128, 0, 129, 0, 130,
- 0, 131, 0, 132, 0, 133, 0, 134, 0, 135,
- 0, 136, 0, 137, 0, 138, 0, 125, 0, 126,
- 0, 127, 0, 128, 0, 27, 0, 28, 0, 93,
- 0, 94, 0, 95, 0, 96, 0, 140, 0, 141,
- 0, 142, 0, 143, 0, 144, 0, 145, 0, 146,
- 0, 147, 0, 148, 0, 149, 0, 150, 0, 151,
- 0, 139, 0, 16, 0, 14, 0, 12, 0, 10,
- 0, 17, 0, 15, 0, 13, 0, 11, 0, 175,
- 0, 176, 0, 18, 0, 19, 0, 211, 152, 0,
- 0, 41, 0, 42, 0, 43, 0, 44, 0, 45,
- 0, 46, 0, 47, 0, 0, 0, 65, 0, 66,
- 0, 67, 0, 68, 0, 69, 0, 70, 0, 64,
- 4, 0, 0, 57, 4, 0, 0, 153, 57, 4,
- 0, 34, 24, 0, 0, 184, 0, 0, 153, 187,
- 186, 0, 184, 0, 57, 4, 0, 190, 0, 8,
- 0, 192, 0, 8, 0, 192, 0, 9, 0, 10,
- 0, 11, 0, 12, 0, 13, 0, 14, 0, 15,
- 0, 16, 0, 17, 0, 18, 0, 19, 0, 21,
- 0, 191, 0, 48, 0, 227, 0, 154, 4, 0,
- 189, 155, 194, 156, 0, 157, 4, 158, 192, 159,
- 0, 160, 4, 158, 192, 161, 0, 162, 193, 163,
- 0, 162, 163, 0, 160, 162, 193, 163, 161, 0,
- 160, 162, 163, 161, 0, 192, 164, 0, 192, 0,
- 193, 153, 192, 0, 193, 0, 193, 153, 37, 0,
- 37, 0, 0, 190, 157, 197, 159, 0, 190, 157,
- 159, 0, 190, 165, 24, 0, 190, 160, 197, 161,
- 0, 190, 162, 197, 163, 0, 190, 162, 163, 0,
- 190, 160, 162, 197, 163, 161, 0, 190, 160, 162,
- 163, 161, 0, 190, 38, 0, 190, 39, 0, 190,
- 227, 0, 190, 196, 0, 190, 26, 0, 175, 167,
- 0, 176, 4, 0, 9, 27, 0, 9, 28, 0,
- 178, 7, 0, 174, 155, 195, 36, 190, 156, 0,
- 110, 155, 195, 242, 156, 0, 112, 155, 195, 153,
- 195, 153, 195, 156, 0, 168, 155, 195, 153, 195,
- 156, 0, 169, 155, 195, 153, 195, 156, 0, 170,
- 155, 195, 153, 195, 156, 0, 103, 171, 155, 195,
- 153, 195, 156, 0, 104, 172, 155, 195, 153, 195,
- 156, 0, 173, 155, 195, 153, 195, 156, 0, 114,
- 155, 195, 153, 195, 156, 0, 115, 155, 195, 153,
- 195, 153, 195, 156, 0, 116, 155, 195, 153, 195,
- 153, 195, 156, 0, 197, 153, 195, 0, 195, 0,
- 32, 0, 33, 0, 200, 0, 200, 220, 0, 200,
- 222, 0, 200, 62, 61, 206, 0, 200, 25, 0,
- 201, 0, 201, 179, 20, 188, 0, 201, 222, 0,
- 201, 62, 61, 206, 0, 0, 201, 179, 180, 198,
- 195, 202, 186, 0, 0, 201, 179, 50, 198, 190,
- 203, 186, 0, 0, 201, 179, 45, 198, 190, 204,
- 186, 0, 0, 201, 179, 47, 198, 190, 205, 186,
- 0, 201, 51, 208, 0, 201, 58, 152, 209, 0,
- 0, 24, 0, 56, 0, 55, 0, 53, 152, 207,
- 0, 54, 152, 4, 0, 52, 152, 24, 0, 71,
- 152, 24, 0, 157, 210, 159, 0, 210, 153, 24,
- 0, 24, 0, 0, 22, 0, 24, 0, 211, 0,
- 0, 190, 212, 0, 214, 153, 213, 0, 213, 0,
- 214, 0, 214, 153, 37, 0, 37, 0, 0, 181,
- 188, 211, 155, 215, 156, 185, 182, 0, 29, 0,
- 162, 0, 180, 216, 217, 0, 30, 0, 163, 0,
- 230, 219, 0, 0, 45, 0, 47, 0, 0, 0,
- 31, 223, 221, 224, 216, 0, 0, 63, 0, 3,
- 0, 4, 0, 7, 0, 27, 0, 28, 0, 38,
- 0, 39, 0, 26, 0, 160, 197, 161, 0, 196,
- 0, 61, 225, 24, 153, 24, 0, 166, 0, 211,
- 0, 227, 0, 226, 0, 190, 228, 0, 230, 231,
- 0, 218, 231, 0, 232, 179, 234, 0, 232, 236,
- 0, 0, 23, 0, 77, 0, 78, 0, 72, 229,
- 0, 72, 8, 0, 73, 21, 228, 0, 73, 9,
- 228, 153, 21, 228, 153, 21, 228, 0, 74, 177,
- 228, 153, 21, 228, 157, 235, 159, 0, 74, 177,
- 228, 153, 21, 228, 157, 159, 0, 75, 181, 188,
- 228, 155, 239, 156, 36, 21, 228, 233, 21, 228,
- 0, 233, 0, 76, 0, 235, 177, 226, 153, 21,
- 228, 0, 177, 226, 153, 21, 228, 0, 179, 241,
- 0, 190, 157, 228, 153, 228, 159, 0, 237, 153,
- 157, 228, 153, 228, 159, 0, 229, 0, 238, 153,
- 229, 0, 238, 0, 0, 60, 59, 0, 59, 0,
- 168, 190, 228, 153, 228, 0, 169, 190, 228, 153,
- 228, 0, 170, 190, 228, 153, 228, 0, 103, 171,
- 190, 228, 153, 228, 0, 104, 172, 190, 228, 153,
- 228, 0, 49, 229, 0, 173, 229, 153, 229, 0,
- 174, 229, 36, 190, 0, 112, 229, 153, 229, 153,
- 229, 0, 113, 229, 153, 190, 0, 117, 229, 153,
- 190, 0, 118, 229, 153, 190, 0, 114, 229, 153,
- 229, 0, 115, 229, 153, 229, 153, 229, 0, 116,
- 229, 153, 229, 153, 229, 0, 111, 237, 0, 240,
- 181, 188, 228, 155, 239, 156, 0, 244, 0, 153,
- 238, 0, 0, 35, 0, 0, 105, 190, 183, 0,
- 105, 190, 153, 15, 228, 183, 0, 106, 190, 183,
- 0, 106, 190, 153, 15, 228, 183, 0, 107, 229,
- 0, 243, 108, 190, 228, 0, 243, 109, 229, 153,
- 190, 228, 0, 110, 190, 228, 242, 0
-};
+/* Line 219 of yacc.c. */
+#line 1889 "UpgradeParser.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,
- 1594, 1595, 1603, 1604, 1614, 1614, 1614, 1614, 1614, 1614,
- 1614, 1614, 1614, 1614, 1614, 1618, 1618, 1618, 1622, 1622,
- 1622, 1622, 1622, 1622, 1626, 1626, 1627, 1627, 1628, 1628,
- 1629, 1629, 1630, 1630, 1634, 1634, 1635, 1635, 1636, 1636,
- 1637, 1637, 1638, 1638, 1639, 1639, 1640, 1640, 1641, 1642,
- 1645, 1645, 1645, 1645, 1649, 1649, 1649, 1649, 1649, 1649,
- 1649, 1650, 1650, 1650, 1650, 1650, 1650, 1656, 1656, 1656,
- 1656, 1660, 1660, 1660, 1660, 1664, 1664, 1668, 1668, 1673,
- 1676, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1692,
- 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1709, 1710, 1718,
- 1719, 1727, 1736, 1737, 1744, 1745, 1749, 1753, 1769, 1770,
- 1777, 1778, 1785, 1793, 1793, 1793, 1793, 1793, 1793, 1793,
- 1794, 1794, 1794, 1794, 1794, 1799, 1803, 1807, 1812, 1821,
- 1838, 1844, 1857, 1866, 1870, 1881, 1885, 1898, 1902, 1909,
- 1910, 1916, 1923, 1935, 1965, 1978, 2001, 2029, 2051, 2062,
- 2084, 2095, 2104, 2109, 2167, 2174, 2182, 2189, 2196, 2200,
- 2204, 2213, 2228, 2241, 2250, 2278, 2291, 2300, 2306, 2312,
- 2323, 2329, 2335, 2346, 2347, 2356, 2357, 2369, 2378, 2379,
- 2380, 2381, 2382, 2398, 2418, 2420, 2422, 2426, 2429, 2433,
- 2436, 2440, 2443, 2448, 2451, 2453, 2455, 2460, 2474, 2475,
- 2479, 2482, 2490, 2494, 2501, 2505, 2509, 2513, 2521, 2521,
- 2525, 2526, 2530, 2538, 2543, 2551, 2552, 2559, 2566, 2570,
- 2746, 2746, 2750, 2760, 2760, 2764, 2769, 2770, 2771, 2775,
- 2776, 2776, 2788, 2789, 2794, 2795, 2796, 2797, 2798, 2799,
- 2800, 2801, 2802, 2823, 2826, 2841, 2842, 2847, 2847, 2855,
- 2864, 2867, 2876, 2886, 2891, 2900, 2911, 2911, 2914, 2917,
- 2920, 2924, 2930, 2945, 2951, 3007, 3010, 3016, 3026, 3039,
- 3068, 3076, 3084, 3088, 3095, 3096, 3100, 3103, 3109, 3126,
- 3142, 3156, 3168, 3180, 3191, 3209, 3218, 3227, 3234, 3255,
- 3279, 3285, 3291, 3297, 3313, 3391, 3399, 3400, 3404, 3405,
- 3409, 3415, 3421, 3427, 3433, 3440, 3452, 3477
-};
+#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 \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","ESINT64VAL",
-"EUINT64VAL","SINTVAL","UINTVAL","FPVAL","VOID","BOOL","SBYTE","UBYTE","SHORT",
-"USHORT","INT","UINT","LONG","ULONG","FLOAT","DOUBLE","TYPE","LABEL","VAR_ID",
-"LABELSTR","STRINGCONSTANT","IMPLEMENTATION","ZEROINITIALIZER","TRUETOK","FALSETOK",
-"BEGINTOK","ENDTOK","DECLARE","GLOBAL","CONSTANT","SECTION","VOLATILE","TO",
-"DOTDOTDOT","NULL_TOK","UNDEF","CONST","INTERNAL","LINKONCE","WEAK","APPENDING",
-"DLLIMPORT","DLLEXPORT","EXTERN_WEAK","OPAQUE","NOT","EXTERNAL","TARGET","TRIPLE",
-"ENDIAN","POINTERSIZE","LITTLE","BIG","ALIGN","DEPLIBS","CALL","TAIL","ASM_TOK",
-"MODULE","SIDEEFFECT","CC_TOK","CCC_TOK","CSRETCC_TOK","FASTCC_TOK","COLDCC_TOK",
-"X86_STDCALLCC_TOK","X86_FASTCALLCC_TOK","DATALAYOUT","RET","BR","SWITCH","INVOKE",
-"UNREACHABLE","UNWIND","EXCEPT","ADD","SUB","MUL","DIV","UDIV","SDIV","FDIV",
-"REM","UREM","SREM","FREM","AND","OR","XOR","SHL","SHR","ASHR","LSHR","SETLE",
-"SETGE","SETLT","SETGT","SETEQ","SETNE","ICMP","FCMP","MALLOC","ALLOCA","FREE",
-"LOAD","STORE","GETELEMENTPTR","PHI_TOK","SELECT","VAARG","EXTRACTELEMENT","INSERTELEMENT",
-"SHUFFLEVECTOR","VAARG_old","VANEXT_old","EQ","NE","SLT","SGT","SLE","SGE","ULT",
-"UGT","ULE","UGE","OEQ","ONE","OLT","OGT","OLE","OGE","ORD","UNO","UEQ","UNE",
-"CAST","TRUNC","ZEXT","SEXT","FPTRUNC","FPEXT","FPTOUI","FPTOSI","UITOFP","SITOFP",
-"PTRTOINT","INTTOPTR","BITCAST","'='","','","'\\\\'","'('","')'","'['","'x'",
-"']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL","ArithmeticOps",
-"LogicalOps","SetCondOps","IPredicates","FPredicates","ShiftOps","CastOps","SIntType",
-"UIntType","IntType","FPType","OptAssign","OptLinkage","OptCallingConv","OptAlign",
-"OptCAlign","SectionString","OptSection","GlobalVarAttributes","GlobalVarAttribute",
-"TypesV","UpRTypesV","Types","PrimType","UpRTypes","TypeListI","ArgTypeListI",
-"ConstVal","ConstExpr","ConstVector","GlobalType","Module","FunctionList","ConstPool",
-"@1","@2","@3","@4","AsmBlock","BigOrLittle","TargetDefinition","LibrariesDefinition",
-"LibList","Name","OptName","ArgVal","ArgListH","ArgList","FunctionHeaderH","BEGIN",
-"FunctionHeader","END","Function","FnDeclareLinkage","FunctionProto","@5","@6",
-"OptSideEffect","ConstValueRef","SymbolicValueRef","ValueRef","ResolvedVal",
-"BasicBlockList","BasicBlock","InstructionList","Unwind","BBTerminatorInst",
-"JumpTable","Inst","PHIList","ValueRefList","ValueRefListE","OptTailCall","InstVal",
-"IndexList","OptVolatile","MemoryInst", NULL
-};
#endif
-static const short yyr1[] = { 0,
- 166, 166, 167, 167, 168, 168, 168, 168, 168, 168,
- 168, 168, 168, 168, 168, 169, 169, 169, 170, 170,
- 170, 170, 170, 170, 171, 171, 171, 171, 171, 171,
- 171, 171, 171, 171, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 173, 173, 173, 173, 174, 174, 174, 174, 174, 174,
- 174, 174, 174, 174, 174, 174, 174, 175, 175, 175,
- 175, 176, 176, 176, 176, 177, 177, 178, 178, 179,
- 179, 180, 180, 180, 180, 180, 180, 180, 180, 181,
- 181, 181, 181, 181, 181, 181, 181, 182, 182, 183,
- 183, 184, 185, 185, 186, 186, 187, 187, 188, 188,
- 189, 189, 190, 191, 191, 191, 191, 191, 191, 191,
- 191, 191, 191, 191, 191, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 193, 193, 194,
- 194, 194, 194, 195, 195, 195, 195, 195, 195, 195,
- 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
- 195, 196, 196, 196, 196, 196, 196, 196, 196, 196,
- 196, 196, 196, 197, 197, 198, 198, 199, 200, 200,
- 200, 200, 200, 201, 201, 201, 202, 201, 203, 201,
- 204, 201, 205, 201, 201, 201, 201, 206, 207, 207,
- 208, 208, 208, 208, 209, 210, 210, 210, 211, 211,
- 212, 212, 213, 214, 214, 215, 215, 215, 215, 216,
- 217, 217, 218, 219, 219, 220, 221, 221, 221, 223,
- 224, 222, 225, 225, 226, 226, 226, 226, 226, 226,
- 226, 226, 226, 226, 226, 227, 227, 228, 228, 229,
- 230, 230, 231, 232, 232, 232, 233, 233, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 235, 235, 236,
- 237, 237, 238, 238, 239, 239, 240, 240, 241, 241,
- 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 242, 242, 243, 243,
- 244, 244, 244, 244, 244, 244, 244, 244
-};
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short int yysigned_char;
+#endif
-static const short yyr2[] = { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 0, 1, 1, 1, 1, 1, 1, 1, 0, 0,
- 1, 1, 1, 1, 1, 1, 2, 0, 2, 0,
- 3, 2, 0, 1, 0, 3, 1, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 4,
- 5, 5, 3, 2, 5, 4, 2, 1, 3, 1,
- 3, 1, 0, 4, 3, 3, 4, 4, 3, 6,
- 5, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 6, 5, 8, 6, 6, 6, 7, 7, 6,
- 6, 8, 8, 3, 1, 1, 1, 1, 2, 2,
- 4, 2, 1, 4, 2, 4, 0, 7, 0, 7,
- 0, 7, 0, 7, 3, 4, 0, 1, 1, 1,
- 3, 3, 3, 3, 3, 3, 1, 0, 1, 1,
- 1, 0, 2, 3, 1, 1, 3, 1, 0, 8,
- 1, 1, 3, 1, 1, 2, 0, 1, 1, 0,
- 0, 5, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 1, 5, 1, 1, 1, 1, 2,
- 2, 2, 3, 2, 0, 1, 1, 1, 2, 2,
- 3, 9, 9, 8, 13, 1, 1, 6, 5, 2,
- 6, 7, 1, 3, 1, 0, 2, 1, 5, 5,
- 5, 6, 6, 2, 4, 4, 6, 4, 4, 4,
- 4, 6, 6, 2, 7, 1, 2, 0, 1, 0,
- 3, 6, 3, 6, 2, 4, 6, 4
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 4
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 1762
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 166
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 80
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 309
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 605
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 406
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned 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,
+ 155, 156, 164, 2, 153, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 160, 152, 161, 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, 157, 154, 159, 2, 2, 2, 2, 2, 165,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 158, 2, 2, 162, 2, 163, 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, 2, 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, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151
};
-static const short yydefact[] = { 197,
- 89, 183, 182, 230, 82, 83, 84, 85, 86, 87,
- 88, 0, 90, 255, 179, 180, 255, 209, 210, 0,
- 0, 0, 89, 0, 185, 227, 0, 0, 91, 92,
- 93, 94, 95, 96, 0, 0, 256, 252, 81, 224,
- 225, 226, 251, 0, 0, 0, 0, 195, 0, 0,
- 0, 0, 0, 0, 0, 80, 228, 229, 231, 198,
- 181, 97, 1, 2, 110, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 127, 0, 0,
- 0, 0, 246, 0, 0, 109, 126, 113, 247, 128,
- 221, 222, 223, 300, 254, 0, 0, 0, 0, 208,
- 196, 186, 184, 176, 177, 0, 0, 0, 0, 90,
- 129, 0, 0, 0, 112, 134, 138, 0, 0, 143,
- 137, 299, 0, 278, 0, 0, 0, 0, 90, 267,
- 257, 258, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 51, 52, 53, 54,
- 19, 20, 21, 22, 23, 24, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 67, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 0, 0, 0, 0, 0, 266, 253,
- 90, 270, 0, 296, 203, 200, 199, 201, 202, 204,
- 207, 0, 191, 193, 189, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 0, 0, 0, 0,
- 187, 232, 0, 0, 0, 0, 0, 133, 219, 142,
- 140, 0, 0, 284, 277, 260, 259, 0, 0, 71,
- 75, 70, 74, 69, 73, 68, 72, 76, 77, 0,
- 0, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, 0, 49, 50, 45, 46, 47, 48, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 0, 100,
- 100, 305, 0, 0, 294, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 205, 105, 105, 105, 159, 160, 3, 4, 157,
- 158, 161, 156, 152, 153, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 155, 154, 105, 111, 111, 136, 0, 139, 218,
- 212, 215, 216, 0, 0, 130, 235, 236, 237, 242,
- 238, 239, 240, 241, 233, 0, 244, 249, 248, 250,
- 0, 261, 0, 0, 0, 0, 0, 301, 0, 303,
- 298, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 206, 0,
- 192, 194, 190, 0, 0, 0, 0, 0, 0, 0,
- 145, 175, 0, 0, 0, 149, 0, 146, 0, 0,
- 0, 0, 0, 188, 131, 132, 135, 211, 213, 0,
- 103, 141, 234, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 308, 0, 0, 0, 288, 291,
- 0, 0, 289, 290, 0, 0, 0, 285, 286, 0,
- 306, 0, 0, 0, 107, 105, 0, 0, 298, 0,
- 0, 0, 0, 0, 144, 134, 113, 0, 147, 148,
- 0, 0, 0, 0, 0, 217, 214, 104, 98, 0,
- 243, 0, 0, 276, 0, 0, 100, 101, 100, 273,
- 297, 0, 0, 0, 0, 0, 279, 280, 281, 276,
- 0, 102, 108, 106, 0, 0, 0, 0, 0, 0,
- 0, 174, 151, 0, 0, 0, 0, 0, 0, 0,
- 220, 0, 0, 0, 275, 0, 282, 283, 0, 302,
- 304, 0, 0, 0, 287, 292, 293, 0, 307, 0,
- 0, 163, 0, 0, 0, 0, 150, 0, 0, 0,
- 0, 0, 99, 245, 0, 0, 0, 274, 271, 0,
- 295, 0, 0, 0, 171, 0, 0, 165, 166, 167,
- 170, 162, 0, 264, 0, 0, 0, 272, 168, 169,
- 0, 0, 0, 262, 0, 263, 0, 0, 164, 172,
- 173, 0, 0, 0, 0, 0, 0, 269, 0, 0,
- 268, 265, 0, 0, 0
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned short int yyprhs[] =
+{
+ 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
+ 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
+ 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
+ 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
+ 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
+ 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
+ 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
+ 139, 141, 143, 145, 147, 149, 151, 153, 155, 157,
+ 159, 161, 164, 165, 167, 169, 171, 173, 175, 177,
+ 179, 180, 181, 183, 185, 187, 189, 191, 193, 196,
+ 197, 200, 201, 205, 208, 209, 211, 212, 216, 218,
+ 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
+ 241, 243, 245, 247, 249, 251, 253, 255, 257, 259,
+ 261, 264, 269, 275, 281, 285, 288, 294, 299, 302,
+ 304, 308, 310, 314, 316, 317, 322, 326, 330, 335,
+ 340, 344, 351, 357, 360, 363, 366, 369, 372, 375,
+ 378, 381, 384, 387, 394, 400, 409, 416, 423, 430,
+ 438, 446, 453, 460, 469, 478, 482, 484, 486, 488,
+ 490, 493, 496, 501, 504, 506, 511, 514, 519, 520,
+ 528, 529, 537, 538, 546, 547, 555, 559, 564, 565,
+ 567, 569, 571, 575, 579, 583, 587, 591, 595, 597,
+ 598, 600, 602, 604, 605, 608, 612, 614, 616, 620,
+ 622, 623, 632, 634, 636, 640, 642, 644, 647, 648,
+ 650, 652, 653, 654, 660, 661, 663, 665, 667, 669,
+ 671, 673, 675, 677, 679, 683, 685, 691, 693, 695,
+ 697, 699, 702, 705, 708, 712, 715, 716, 718, 720,
+ 722, 725, 728, 732, 742, 752, 761, 775, 777, 779,
+ 786, 792, 795, 802, 810, 812, 816, 818, 819, 822,
+ 824, 830, 836, 842, 849, 856, 859, 864, 869, 876,
+ 881, 886, 891, 896, 903, 910, 913, 921, 923, 926,
+ 927, 929, 930, 934, 941, 945, 952, 955, 960, 967
};
-static const short yydefgoto[] = { 83,
- 310, 327, 328, 329, 262, 279, 330, 331, 217, 218,
- 250, 219, 23, 13, 35, 521, 368, 455, 479, 391,
- 456, 84, 85, 220, 87, 88, 118, 232, 402, 357,
- 403, 106, 603, 1, 2, 334, 305, 303, 304, 61,
- 198, 48, 101, 202, 89, 419, 342, 343, 344, 36,
- 93, 14, 42, 15, 59, 16, 26, 110, 424, 358,
- 90, 360, 490, 17, 38, 39, 189, 190, 576, 95,
- 285, 525, 526, 191, 192, 435, 193, 194
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const short int yyrhs[] =
+{
+ 200, 0, -1, 5, -1, 6, -1, 3, -1, 4,
+ -1, 79, -1, 80, -1, 81, -1, 82, -1, 83,
+ -1, 84, -1, 85, -1, 86, -1, 87, -1, 88,
+ -1, 89, -1, 90, -1, 91, -1, 92, -1, 97,
+ -1, 98, -1, 99, -1, 100, -1, 101, -1, 102,
+ -1, 119, -1, 120, -1, 121, -1, 122, -1, 123,
+ -1, 124, -1, 125, -1, 126, -1, 127, -1, 128,
+ -1, 129, -1, 130, -1, 131, -1, 132, -1, 133,
+ -1, 134, -1, 135, -1, 136, -1, 137, -1, 138,
+ -1, 125, -1, 126, -1, 127, -1, 128, -1, 27,
+ -1, 28, -1, 93, -1, 94, -1, 95, -1, 96,
+ -1, 140, -1, 141, -1, 142, -1, 143, -1, 144,
+ -1, 145, -1, 146, -1, 147, -1, 148, -1, 149,
+ -1, 150, -1, 151, -1, 139, -1, 16, -1, 14,
+ -1, 12, -1, 10, -1, 17, -1, 15, -1, 13,
+ -1, 11, -1, 176, -1, 177, -1, 18, -1, 19,
+ -1, 212, 152, -1, -1, 41, -1, 42, -1, 43,
+ -1, 44, -1, 45, -1, 46, -1, 47, -1, -1,
+ -1, 65, -1, 66, -1, 67, -1, 68, -1, 69,
+ -1, 70, -1, 64, 4, -1, -1, 57, 4, -1,
+ -1, 153, 57, 4, -1, 34, 24, -1, -1, 185,
+ -1, -1, 153, 188, 187, -1, 185, -1, 57, 4,
+ -1, 191, -1, 8, -1, 193, -1, 8, -1, 193,
+ -1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
+ -1, 14, -1, 15, -1, 16, -1, 17, -1, 18,
+ -1, 19, -1, 21, -1, 192, -1, 48, -1, 228,
+ -1, 154, 4, -1, 190, 155, 195, 156, -1, 157,
+ 4, 158, 193, 159, -1, 160, 4, 158, 193, 161,
+ -1, 162, 194, 163, -1, 162, 163, -1, 160, 162,
+ 194, 163, 161, -1, 160, 162, 163, 161, -1, 193,
+ 164, -1, 193, -1, 194, 153, 193, -1, 194, -1,
+ 194, 153, 37, -1, 37, -1, -1, 191, 157, 198,
+ 159, -1, 191, 157, 159, -1, 191, 165, 24, -1,
+ 191, 160, 198, 161, -1, 191, 162, 198, 163, -1,
+ 191, 162, 163, -1, 191, 160, 162, 198, 163, 161,
+ -1, 191, 160, 162, 163, 161, -1, 191, 38, -1,
+ 191, 39, -1, 191, 228, -1, 191, 197, -1, 191,
+ 26, -1, 176, 168, -1, 177, 4, -1, 9, 27,
+ -1, 9, 28, -1, 179, 7, -1, 175, 155, 196,
+ 36, 191, 156, -1, 110, 155, 196, 243, 156, -1,
+ 112, 155, 196, 153, 196, 153, 196, 156, -1, 169,
+ 155, 196, 153, 196, 156, -1, 170, 155, 196, 153,
+ 196, 156, -1, 171, 155, 196, 153, 196, 156, -1,
+ 103, 172, 155, 196, 153, 196, 156, -1, 104, 173,
+ 155, 196, 153, 196, 156, -1, 174, 155, 196, 153,
+ 196, 156, -1, 114, 155, 196, 153, 196, 156, -1,
+ 115, 155, 196, 153, 196, 153, 196, 156, -1, 116,
+ 155, 196, 153, 196, 153, 196, 156, -1, 198, 153,
+ 196, -1, 196, -1, 32, -1, 33, -1, 201, -1,
+ 201, 221, -1, 201, 223, -1, 201, 62, 61, 207,
+ -1, 201, 25, -1, 202, -1, 202, 180, 20, 189,
+ -1, 202, 223, -1, 202, 62, 61, 207, -1, -1,
+ 202, 180, 181, 199, 196, 203, 187, -1, -1, 202,
+ 180, 50, 199, 191, 204, 187, -1, -1, 202, 180,
+ 45, 199, 191, 205, 187, -1, -1, 202, 180, 47,
+ 199, 191, 206, 187, -1, 202, 51, 209, -1, 202,
+ 58, 152, 210, -1, -1, 24, -1, 56, -1, 55,
+ -1, 53, 152, 208, -1, 54, 152, 4, -1, 52,
+ 152, 24, -1, 71, 152, 24, -1, 157, 211, 159,
+ -1, 211, 153, 24, -1, 24, -1, -1, 22, -1,
+ 24, -1, 212, -1, -1, 191, 213, -1, 215, 153,
+ 214, -1, 214, -1, 215, -1, 215, 153, 37, -1,
+ 37, -1, -1, 182, 189, 212, 155, 216, 156, 186,
+ 183, -1, 29, -1, 162, -1, 181, 217, 218, -1,
+ 30, -1, 163, -1, 231, 220, -1, -1, 45, -1,
+ 47, -1, -1, -1, 31, 224, 222, 225, 217, -1,
+ -1, 63, -1, 3, -1, 4, -1, 7, -1, 27,
+ -1, 28, -1, 38, -1, 39, -1, 26, -1, 160,
+ 198, 161, -1, 197, -1, 61, 226, 24, 153, 24,
+ -1, 167, -1, 212, -1, 228, -1, 227, -1, 191,
+ 229, -1, 231, 232, -1, 219, 232, -1, 233, 180,
+ 235, -1, 233, 237, -1, -1, 23, -1, 77, -1,
+ 78, -1, 72, 230, -1, 72, 8, -1, 73, 21,
+ 229, -1, 73, 9, 229, 153, 21, 229, 153, 21,
+ 229, -1, 74, 178, 229, 153, 21, 229, 157, 236,
+ 159, -1, 74, 178, 229, 153, 21, 229, 157, 159,
+ -1, 75, 182, 189, 229, 155, 240, 156, 36, 21,
+ 229, 234, 21, 229, -1, 234, -1, 76, -1, 236,
+ 178, 227, 153, 21, 229, -1, 178, 227, 153, 21,
+ 229, -1, 180, 242, -1, 191, 157, 229, 153, 229,
+ 159, -1, 238, 153, 157, 229, 153, 229, 159, -1,
+ 230, -1, 239, 153, 230, -1, 239, -1, -1, 60,
+ 59, -1, 59, -1, 169, 191, 229, 153, 229, -1,
+ 170, 191, 229, 153, 229, -1, 171, 191, 229, 153,
+ 229, -1, 103, 172, 191, 229, 153, 229, -1, 104,
+ 173, 191, 229, 153, 229, -1, 49, 230, -1, 174,
+ 230, 153, 230, -1, 175, 230, 36, 191, -1, 112,
+ 230, 153, 230, 153, 230, -1, 113, 230, 153, 191,
+ -1, 117, 230, 153, 191, -1, 118, 230, 153, 191,
+ -1, 114, 230, 153, 230, -1, 115, 230, 153, 230,
+ 153, 230, -1, 116, 230, 153, 230, 153, 230, -1,
+ 111, 238, -1, 241, 182, 189, 229, 155, 240, 156,
+ -1, 245, -1, 153, 239, -1, -1, 35, -1, -1,
+ 105, 191, 184, -1, 105, 191, 153, 15, 229, 184,
+ -1, 106, 191, 184, -1, 106, 191, 153, 15, 229,
+ 184, -1, 107, 230, -1, 244, 108, 191, 229, -1,
+ 244, 109, 230, 153, 191, 229, -1, 110, 191, 229,
+ 243, -1
};
-static const short yypact[] = {-32768,
- 58, 247,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, -44, 181, 69,-32768,-32768, 10,-32768,-32768, 16,
- -116, 34, 65, -38,-32768, 112, 118, 144,-32768,-32768,
--32768,-32768,-32768,-32768, 1357, -19,-32768,-32768, 39,-32768,
--32768,-32768,-32768, 6, 12, 20, 23,-32768, 55, 118,
- 1357, 86, 86, 86, 86,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768, 36,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 210, 218,
- 1, 171,-32768, 39, 73,-32768,-32768, -42,-32768,-32768,
--32768,-32768,-32768, 1611,-32768, 215, 83, 236, 219, 233,
--32768,-32768,-32768,-32768,-32768, 1418, 1418, 1418, 1459, 181,
--32768, 84, 100, 737,-32768,-32768, -42, -99, 104, 803,
--32768,-32768, 1418,-32768, 201, 1479, 14, 221, 181,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768, 77, 377, 1418, 1418,
- 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768, 1418, 1418, 1418, 1418, 1418,-32768,-32768,
- 181,-32768, 53,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, -36,-32768,-32768,-32768, 140, 167, 257, 204, 262,
- 206, 264, 214, 266, 265, 268, 217, 269, 270, 579,
--32768,-32768, 1418, 1418, 115, -96, 1418,-32768, 1199,-32768,
- 128, 126, 920,-32768,-32768, 36,-32768, 920, 920,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 920,
- 1357,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, 1418,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1418, 130,
- 142,-32768, 920, 139, 151, 153, 154, 155, 157, 158,
- 164, 165, 920, 920, 920, 166, 284, 1357, 1418, 1418,
- 297,-32768, 169, 169, 169,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768, 77, 377, 168, 172, 174,
- 175, 177, 1240, 1520, 757, 300, 180, 182, 183, 192,
- 193,-32768,-32768, 169, -43, -71,-32768, 190, -42,-32768,
- 39,-32768, 173, 202, 1260,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768, 273, 1459,-32768,-32768,-32768,-32768,
- 209,-32768, 212, 920, 920, 920, -4,-32768, -2,-32768,
- 213, 920, 211, 1418, 1418, 1418, 1418, 1418, 1418, 1418,
- 216, 222, 223, 1418, 1418, 920, 920, 226,-32768, -20,
--32768,-32768,-32768, 225, 227, 1459, 1459, 1459, 1459, 1459,
--32768,-32768, -13, 778, -17,-32768, -69,-32768, 1459, 1459,
- 1459, 1459, 1459,-32768,-32768,-32768,-32768,-32768,-32768, 1301,
- 325,-32768,-32768, 346, -16, 350, 360, 228, 231, 234,
- 920, 382, 920, 1418,-32768, 235, 920, 237,-32768,-32768,
- 238, 239,-32768,-32768, 920, 920, 920,-32768,-32768, 240,
--32768, 1418, 365, 389,-32768, 169, 1459, 1459, 213, 241,
- 243, 245, 248, 1459,-32768, 242, -104, -67,-32768,-32768,
- 249, 253, 263, 272, 364,-32768,-32768,-32768, 358, 274,
--32768, 920, 920, 1418, 920, 920, 276,-32768, 276,-32768,
- 279, 920, 280, 1418, 1418, 1418,-32768,-32768,-32768, 1418,
- 920,-32768,-32768,-32768, 281, 282, 267, 1459, 1459, 1459,
- 1459,-32768,-32768, 278, 1459, 1459, 1459, 1459, 1418, 422,
--32768, 416, 288, 285, 279, 289,-32768,-32768, 390,-32768,
--32768, 1418, 287, 920,-32768,-32768,-32768, 292,-32768, 1459,
- 1459,-32768, 299, 298, 302, 303,-32768, 301, 306, 307,
- 308, 310,-32768,-32768, 432, 15, 435,-32768,-32768, 309,
--32768, 316, 319, 1459,-32768, 1459, 1459,-32768,-32768,-32768,
--32768,-32768, 920,-32768, 1046, 64, 437,-32768,-32768,-32768,
- 326, 329, 331,-32768, 328,-32768, 1046, 920,-32768,-32768,
--32768, 467, 336, 148, 920, 469, 470,-32768, 920, 920,
--32768,-32768, 493, 494,-32768
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned short int yyrline[] =
+{
+ 0, 1594, 1594, 1595, 1603, 1604, 1614, 1614, 1614, 1614,
+ 1614, 1614, 1614, 1614, 1614, 1614, 1614, 1618, 1618, 1618,
+ 1622, 1622, 1622, 1622, 1622, 1622, 1626, 1626, 1627, 1627,
+ 1628, 1628, 1629, 1629, 1630, 1630, 1634, 1634, 1635, 1635,
+ 1636, 1636, 1637, 1637, 1638, 1638, 1639, 1639, 1640, 1640,
+ 1641, 1642, 1645, 1645, 1645, 1645, 1649, 1649, 1649, 1649,
+ 1649, 1649, 1649, 1650, 1650, 1650, 1650, 1650, 1650, 1656,
+ 1656, 1656, 1656, 1660, 1660, 1660, 1660, 1664, 1664, 1668,
+ 1668, 1673, 1676, 1681, 1682, 1683, 1684, 1685, 1686, 1687,
+ 1688, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1709,
+ 1710, 1718, 1719, 1727, 1736, 1737, 1744, 1745, 1749, 1753,
+ 1769, 1770, 1777, 1778, 1785, 1793, 1793, 1793, 1793, 1793,
+ 1793, 1793, 1794, 1794, 1794, 1794, 1794, 1799, 1803, 1807,
+ 1812, 1821, 1838, 1844, 1857, 1866, 1870, 1881, 1885, 1898,
+ 1902, 1909, 1910, 1916, 1923, 1935, 1965, 1978, 2001, 2029,
+ 2051, 2062, 2084, 2095, 2104, 2109, 2167, 2174, 2182, 2189,
+ 2196, 2200, 2204, 2213, 2228, 2241, 2250, 2278, 2291, 2300,
+ 2306, 2312, 2323, 2329, 2335, 2346, 2347, 2356, 2357, 2369,
+ 2378, 2379, 2380, 2381, 2382, 2398, 2418, 2420, 2422, 2422,
+ 2429, 2429, 2436, 2436, 2443, 2443, 2451, 2453, 2455, 2460,
+ 2474, 2475, 2479, 2482, 2490, 2494, 2501, 2505, 2509, 2513,
+ 2521, 2521, 2525, 2526, 2530, 2538, 2543, 2551, 2552, 2559,
+ 2566, 2570, 2746, 2746, 2750, 2760, 2760, 2764, 2769, 2770,
+ 2771, 2775, 2776, 2775, 2788, 2789, 2794, 2795, 2796, 2797,
+ 2798, 2799, 2800, 2801, 2802, 2823, 2826, 2841, 2842, 2847,
+ 2847, 2855, 2864, 2867, 2876, 2886, 2891, 2900, 2911, 2911,
+ 2914, 2917, 2920, 2924, 2930, 2945, 2951, 3007, 3010, 3016,
+ 3026, 3039, 3068, 3076, 3084, 3088, 3095, 3096, 3100, 3103,
+ 3109, 3126, 3142, 3156, 3168, 3180, 3191, 3209, 3218, 3227,
+ 3234, 3255, 3279, 3285, 3291, 3297, 3313, 3391, 3399, 3400,
+ 3404, 3405, 3409, 3415, 3421, 3427, 3433, 3440, 3452, 3477
};
+#endif
-static const short yypgoto[] = {-32768,
--32768, 401, 402, 404, 200, 203, 405, 423, -126, -125,
- -535,-32768, 479, 496, -109,-32768, -274, 102,-32768, -296,
--32768, -45,-32768, -35,-32768, -58, 27,-32768, -97, 304,
- -306, 101,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 471,
--32768,-32768,-32768,-32768, 13,-32768, 106,-32768,-32768, 412,
--32768,-32768,-32768,-32768,-32768, 525,-32768,-32768,-32768, -553,
- -9, 114, -122,-32768, 511,-32768, -65,-32768,-32768,-32768,
--32768, 96, 31,-32768,-32768, 74,-32768,-32768
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL", "SINTVAL",
+ "UINTVAL", "FPVAL", "VOID", "BOOL", "SBYTE", "UBYTE", "SHORT", "USHORT",
+ "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE", "TYPE", "LABEL",
+ "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
+ "ZEROINITIALIZER", "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK",
+ "DECLARE", "GLOBAL", "CONSTANT", "SECTION", "VOLATILE", "TO",
+ "DOTDOTDOT", "NULL_TOK", "UNDEF", "CONST", "INTERNAL", "LINKONCE",
+ "WEAK", "APPENDING", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE",
+ "NOT", "EXTERNAL", "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE",
+ "BIG", "ALIGN", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
+ "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
+ "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
+ "RET", "BR", "SWITCH", "INVOKE", "UNREACHABLE", "UNWIND", "EXCEPT",
+ "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
+ "SREM", "FREM", "AND", "OR", "XOR", "SHL", "SHR", "ASHR", "LSHR",
+ "SETLE", "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "ICMP", "FCMP",
+ "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK",
+ "SELECT", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR",
+ "VAARG_old", "VANEXT_old", "EQ", "NE", "SLT", "SGT", "SLE", "SGE", "ULT",
+ "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD",
+ "UNO", "UEQ", "UNE", "CAST", "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT",
+ "FPTOUI", "FPTOSI", "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR",
+ "BITCAST", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'",
+ "'<'", "'>'", "'{'", "'}'", "'*'", "'c'", "$accept", "INTVAL",
+ "EINT64VAL", "ArithmeticOps", "LogicalOps", "SetCondOps", "IPredicates",
+ "FPredicates", "ShiftOps", "CastOps", "SIntType", "UIntType", "IntType",
+ "FPType", "OptAssign", "OptLinkage", "OptCallingConv", "OptAlign",
+ "OptCAlign", "SectionString", "OptSection", "GlobalVarAttributes",
+ "GlobalVarAttribute", "TypesV", "UpRTypesV", "Types", "PrimType",
+ "UpRTypes", "TypeListI", "ArgTypeListI", "ConstVal", "ConstExpr",
+ "ConstVector", "GlobalType", "Module", "FunctionList", "ConstPool", "@1",
+ "@2", "@3", "@4", "AsmBlock", "BigOrLittle", "TargetDefinition",
+ "LibrariesDefinition", "LibList", "Name", "OptName", "ArgVal",
+ "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader",
+ "END", "Function", "FnDeclareLinkage", "FunctionProto", "@5", "@6",
+ "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef",
+ "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList",
+ "Unwind", "BBTerminatorInst", "JumpTable", "Inst", "PHIList",
+ "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal", "IndexList",
+ "OptVolatile", "MemoryInst", 0
};
+#endif
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short int yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 61, 44, 92, 40, 41, 91, 120, 93,
+ 60, 62, 123, 125, 42, 99
+};
+# endif
-#define YYLAST 1762
-
-
-static const short yytable[] = { 86,
- 234, 248, 249, 237, 113, 103, 370, 392, 393, 91,
- 431, 221, 433, 453, 24, 86, 27, 405, 407, 251,
- 575, 585, 238, 117, 240, 241, 242, 243, 244, 245,
- 246, 247, 37, 593, 239, 49, 454, 414, 282, 40,
- 587, 286, 287, 288, 289, 290, 291, 292, -138, 425,
- -111, 24, 432, 227, 432, 117, 227, -178, -138, 121,
- 18, 117, 19, 228, 296, 297, 338, 44, 45, 46,
- 203, 204, 205, 240, 241, 242, 243, 244, 245, 246,
- 247, 298, 3, 464, 51, 464, 47, 233, 4, 416,
- 233, 37, 121, 470, 50, 514, 119, 468, 5, 6,
- 7, 8, 9, 10, 11, 5, 6, 7, 8, 52,
- 10, 53, -111, 56, 54, 415, 301, 104, 105, 12,
- 121, 121, 302, 280, 281, 233, 283, 284, 233, 233,
- 233, 233, 233, 233, 233, 464, 464, 196, 197, 464,
- 226, 60, 92, 469, 481, 465, 231, 62, 293, 294,
- 295, 233, 233, 107, 108, 109, 57, 96, 58, 504,
- 299, 300, 114, 97, 335, 336, 306, 307, 339, -71,
- -71, 98, 41, 574, 99, 63, 64, 388, 115, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- -112, 77, 18, 341, 19, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 364, -70, -70, -69, -69,
- 333, 100, 530, 111, 531, 86, -68, -68, 78, 308,
- 309, 112, 586, 359, 131, 132, 365, 120, 359, 359,
- 240, 241, 242, 243, 244, 245, 246, 247, 195, 199,
- 359, 223, 200, 366, 28, 29, 30, 31, 32, 33,
- 34, 438, 386, 440, 441, 442, 201, 224, 229, 235,
- -75, 448, 86, 387, 233, -74, -81, -73, 18, -72,
- 19, -78, 311, 359, -79, 337, 312, 4, -81, -81,
- 345, 346, 367, 359, 359, 359, 339, -81, -81, -81,
- -81, -81, -81, -81, 369, 372, -81, 20, 459, 460,
- 461, 462, 463, 373, 21, 374, 375, 376, 22, 377,
- 378, 471, 472, 473, 474, 475, 379, 380, 384, 385,
- 389, 390, 396, 408, 79, 420, 397, 80, 398, 399,
- 81, 400, 82, 116, 409, 423, 410, 411, 233, 439,
- 233, 233, 233, 443, 444, 467, 412, 413, 233, 449,
- 417, 361, 362, 418, 359, 359, 359, 421, 453, 505,
- 506, 426, 359, 363, 427, 434, 512, 437, 445, 480,
- 482, 535, 536, 537, 446, 447, 359, 359, 452, 457,
- 483, 458, 484, 485, 341, 488, 486, 492, 502, 494,
- 495, 496, 503, 508, 500, 509, 371, 510, 233, 519,
- 511, 515, 513, 263, 264, 516, 381, 382, 383, 558,
- 543, 544, 545, 546, 520, 517, 501, 548, 549, 550,
- 551, 359, 542, 359, 518, 553, 522, 359, 529, 248,
- 249, 532, 534, 540, 541, 359, 359, 359, 547, 554,
- 555, 556, 562, 563, 557, 559, 432, 561, 233, 248,
- 249, 564, 573, 565, 566, 567, 568, 588, 233, 233,
- 233, 569, 570, 571, 233, 572, 581, 578, 582, 583,
- 577, 579, 359, 359, 580, 359, 359, 428, 429, 430,
- 592, 589, 359, 552, 590, 436, 591, 595, 596, 599,
- 600, 359, 604, 605, 184, 185, 233, 186, 187, 450,
- 451, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- 274, 275, 276, 277, 278, 394, 188, 94, 55, 395,
- 102, 222, 478, 332, 359, 477, 25, 43, 597, 491,
- 538, 0, 507, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 487, 0, 489, 0, 0, 0,
- 493, 0, 0, 0, 0, 0, 0, 0, 497, 498,
- 499, 0, 0, 359, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 359, 0,
- 0, 0, 0, 63, 64, 359, 0, 0, 0, 359,
- 359, 0, 0, 0, 0, 523, 524, 0, 527, 528,
- 18, 0, 19, 0, 313, 533, 0, 0, 0, 0,
- 0, 0, 0, 0, 539, 0, 314, 315, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 560, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 133, 134, 135,
- 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
- 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
- 156, 316, 317, 0, 0, 0, 584, 0, 318, 0,
- 319, 0, 320, 321, 322, 0, 0, 0, 0, 0,
- 0, 594, 0, 0, 0, 0, 0, 0, 598, 0,
- 0, 0, 601, 602, 0, 0, 0, 171, 172, 173,
- 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
- 0, 0, 0, 0, 0, 323, 0, 0, 324, 0,
- 325, 63, 64, 326, 115, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, 75, 76, 0, 77, 18, 0,
- 19, 63, 64, 0, 115, 206, 207, 208, 209, 210,
- 211, 212, 213, 214, 215, 216, 0, 77, 18, 0,
- 19, 0, 63, 64, 78, 115, 206, 207, 208, 209,
- 210, 211, 212, 213, 214, 215, 216, 0, 77, 18,
- 0, 19, 0, 0, 78, 0, 0, 63, 64, 0,
- 115, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 0, 77, 18, 78, 19, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 230,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 78, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 79, 0, 0, 80, 0, 0, 81, 0, 82, 225,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 79, 0, 0, 80, 0, 0, 81, 0, 82, 406,
- 0, 0, 347, 348, 63, 64, 349, 0, 0, 0,
- 0, 79, 0, 0, 80, 0, 0, 81, 0, 82,
- 466, 18, 0, 19, 0, 350, 351, 352, 0, 0,
- 0, 0, 0, 0, 0, 0, 79, 353, 354, 80,
- 0, 0, 81, 0, 82, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 355, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 133, 134,
- 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
- 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
- 155, 156, 316, 317, 0, 0, 0, 0, 0, 318,
- 0, 319, 0, 320, 321, 322, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 347, 348,
- 0, 0, 349, 0, 0, 0, 0, 0, 171, 172,
- 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
- 183, 350, 351, 352, 0, 0, 0, 0, 0, 356,
- 0, 0, 0, 353, 354, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 355, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 316, 317,
- 0, 0, 0, 0, 0, 318, 0, 319, 0, 320,
- 321, 322, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 0, 0, 0,
- 0, 0, 0, 63, 64, 356, 115, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 0, 77,
- 18, 0, 19, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 340, 0, 0, 0, 0,
- 0, 0, 0, 0, 63, 64, 78, 115, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 0,
- 77, 18, 0, 19, 63, 64, 0, 115, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
- 77, 18, 0, 19, 0, 0, 0, 78, 0, 0,
- 0, 0, 0, 0, 0, 0, 422, 0, 0, 0,
- 0, 0, 0, 0, 0, 63, 64, 78, 115, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 0, 77, 18, 0, 19, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 476, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 78, 0,
- 0, 0, 79, 0, 0, 80, 0, 0, 81, 0,
- 82, 63, 64, 0, 65, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, 75, 76, 0, 77, 18, 0,
- 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 79, 0, 0, 80, 0, 401, 81,
- 0, 82, 0, 0, 78, 0, 0, 0, 0, 0,
- 0, 0, 0, 79, 0, 0, 80, 0, 0, 81,
- 0, 82, 63, 64, 0, 115, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 0, 77, 18,
- 0, 19, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 79, 0, 0, 80, 0, 0,
- 81, 0, 82, 63, 64, 78, 115, 206, 207, 208,
- 209, 210, 211, 212, 213, 214, 215, 216, 0, 77,
- 18, 0, 19, 63, 64, 0, 236, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 0, 77,
- 18, 0, 19, 0, 0, 0, 78, 0, 0, 0,
- 79, 0, 0, 80, 0, 0, 81, 0, 82, 0,
- 0, 0, 0, 0, 63, 64, 78, 115, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 0,
- 77, 18, 0, 19, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 78, 0, 0,
- 0, 79, 0, 0, 80, 0, 0, 81, 0, 82,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 79, 0, 0, 80, 0, 0, 81, 0,
- 82, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 79, 0, 0, 80, 0, 0, 81, 0,
- 82, 0, 0, 0, 0, 122, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 123,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 124,
- 125, 0, 0, 79, 0, 0, 80, 0, 0, 81,
- 0, 404, 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
- 154, 155, 156, 157, 158, 159, 160, 161, 0, 0,
- 162, 163, 164, 165, 166, 167, 168, 169, 170, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 171,
- 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
- 182, 183
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 166, 167, 167, 168, 168, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 170, 170, 170,
+ 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 174, 174, 174, 174, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 176,
+ 176, 176, 176, 177, 177, 177, 177, 178, 178, 179,
+ 179, 180, 180, 181, 181, 181, 181, 181, 181, 181,
+ 181, 182, 182, 182, 182, 182, 182, 182, 182, 183,
+ 183, 184, 184, 185, 186, 186, 187, 187, 188, 188,
+ 189, 189, 190, 190, 191, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 194,
+ 194, 195, 195, 195, 195, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 197, 197, 197, 197, 197, 197, 197,
+ 197, 197, 197, 197, 197, 198, 198, 199, 199, 200,
+ 201, 201, 201, 201, 201, 202, 202, 202, 203, 202,
+ 204, 202, 205, 202, 206, 202, 202, 202, 202, 207,
+ 208, 208, 209, 209, 209, 209, 210, 211, 211, 211,
+ 212, 212, 213, 213, 214, 215, 215, 216, 216, 216,
+ 216, 217, 218, 218, 219, 220, 220, 221, 222, 222,
+ 222, 224, 225, 223, 226, 226, 227, 227, 227, 227,
+ 227, 227, 227, 227, 227, 227, 227, 228, 228, 229,
+ 229, 230, 231, 231, 232, 233, 233, 233, 234, 234,
+ 235, 235, 235, 235, 235, 235, 235, 235, 235, 236,
+ 236, 237, 238, 238, 239, 239, 240, 240, 241, 241,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 243, 243,
+ 244, 244, 245, 245, 245, 245, 245, 245, 245, 245
};
-static const short yycheck[] = { 35,
- 123, 128, 128, 126, 4, 51, 281, 304, 305, 29,
- 15, 109, 15, 34, 2, 51, 61, 324, 325, 129,
- 556, 575, 9, 82, 10, 11, 12, 13, 14, 15,
- 16, 17, 23, 587, 21, 152, 57, 334, 161, 30,
- 576, 164, 165, 166, 167, 168, 169, 170, 153, 356,
- 155, 39, 57, 153, 57, 114, 153, 0, 163, 164,
- 22, 120, 24, 163, 187, 188, 163, 52, 53, 54,
- 106, 107, 108, 10, 11, 12, 13, 14, 15, 16,
- 17, 191, 25, 153, 20, 153, 71, 123, 31, 161,
- 126, 23, 164, 163, 61, 163, 84, 404, 41, 42,
- 43, 44, 45, 46, 47, 41, 42, 43, 44, 45,
- 46, 47, 155, 152, 50, 159, 153, 32, 33, 62,
- 164, 164, 159, 159, 160, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 153, 153, 55, 56, 153,
- 114, 24, 162, 161, 161, 159, 120, 4, 184, 185,
- 186, 187, 188, 53, 54, 55, 45, 152, 47, 456,
- 108, 109, 162, 152, 223, 224, 27, 28, 227, 3,
- 4, 152, 163, 159, 152, 5, 6, 300, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 155, 21, 22, 229, 24, 119, 120, 121, 122, 123,
- 124, 125, 126, 127, 128, 251, 3, 4, 3, 4,
- 220, 157, 487, 4, 489, 251, 3, 4, 48, 3,
- 4, 4, 159, 233, 77, 78, 262, 155, 238, 239,
- 10, 11, 12, 13, 14, 15, 16, 17, 24, 4,
- 250, 158, 24, 279, 64, 65, 66, 67, 68, 69,
- 70, 374, 298, 376, 377, 378, 24, 158, 155, 59,
- 4, 384, 298, 299, 300, 4, 20, 4, 22, 4,
- 24, 7, 4, 283, 7, 161, 7, 31, 32, 33,
- 153, 156, 153, 293, 294, 295, 345, 41, 42, 43,
- 44, 45, 46, 47, 153, 157, 50, 51, 396, 397,
- 398, 399, 400, 153, 58, 153, 153, 153, 62, 153,
- 153, 409, 410, 411, 412, 413, 153, 153, 153, 36,
- 24, 153, 155, 24, 154, 153, 155, 157, 155, 155,
- 160, 155, 162, 163, 155, 63, 155, 155, 374, 375,
- 376, 377, 378, 379, 380, 404, 155, 155, 384, 385,
- 161, 238, 239, 341, 364, 365, 366, 156, 34, 457,
- 458, 153, 372, 250, 153, 153, 464, 157, 153, 24,
- 21, 494, 495, 496, 153, 153, 386, 387, 153, 155,
- 21, 155, 155, 153, 420, 4, 153, 153, 24, 153,
- 153, 153, 4, 153, 155, 153, 283, 153, 434, 36,
- 153, 153, 161, 27, 28, 153, 293, 294, 295, 532,
- 508, 509, 510, 511, 57, 153, 452, 515, 516, 517,
- 518, 431, 156, 433, 153, 4, 153, 437, 153, 556,
- 556, 153, 153, 153, 153, 445, 446, 447, 161, 24,
- 153, 157, 540, 541, 156, 159, 57, 156, 484, 576,
- 576, 153, 21, 156, 153, 153, 156, 21, 494, 495,
- 496, 156, 156, 156, 500, 156, 564, 159, 566, 567,
- 36, 156, 482, 483, 156, 485, 486, 364, 365, 366,
- 153, 156, 492, 519, 156, 372, 156, 21, 153, 21,
- 21, 501, 0, 0, 94, 94, 532, 94, 94, 386,
- 387, 125, 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 316, 94, 39, 23, 317,
- 50, 110, 421, 220, 534, 420, 2, 17, 594, 434,
- 500, -1, 459, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 431, -1, 433, -1, -1, -1,
- 437, -1, -1, -1, -1, -1, -1, -1, 445, 446,
- 447, -1, -1, 573, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 588, -1,
- -1, -1, -1, 5, 6, 595, -1, -1, -1, 599,
- 600, -1, -1, -1, -1, 482, 483, -1, 485, 486,
- 22, -1, 24, -1, 26, 492, -1, -1, -1, -1,
- -1, -1, -1, -1, 501, -1, 38, 39, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 534, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, -1, -1, -1, 573, -1, 110, -1,
- 112, -1, 114, 115, 116, -1, -1, -1, -1, -1,
- -1, 588, -1, -1, -1, -1, -1, -1, 595, -1,
- -1, -1, 599, 600, -1, -1, -1, 139, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
- -1, -1, -1, -1, -1, 157, -1, -1, 160, -1,
- 162, 5, 6, 165, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, -1, 21, 22, -1,
- 24, 5, 6, -1, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, -1, 21, 22, -1,
- 24, -1, 5, 6, 48, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
- -1, 24, -1, -1, 48, -1, -1, 5, 6, -1,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, -1, 21, 22, 48, 24, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 48, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 154, -1, -1, 157, -1, -1, 160, -1, 162, 163,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 154, -1, -1, 157, -1, -1, 160, -1, 162, 163,
- -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
- -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
- 163, 22, -1, 24, -1, 26, 27, 28, -1, -1,
- -1, -1, -1, -1, -1, -1, 154, 38, 39, 157,
- -1, -1, 160, -1, 162, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 61, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 79, 80,
- 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
- 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
- 101, 102, 103, 104, -1, -1, -1, -1, -1, 110,
- -1, 112, -1, 114, 115, 116, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
- -1, -1, 7, -1, -1, -1, -1, -1, 139, 140,
- 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
- 151, 26, 27, 28, -1, -1, -1, -1, -1, 160,
- -1, -1, -1, 38, 39, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 61, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 79, 80, 81, 82, 83, 84,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- -1, -1, -1, -1, -1, 110, -1, 112, -1, 114,
- 115, 116, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 139, 140, 141, 142, 143, 144,
- 145, 146, 147, 148, 149, 150, 151, -1, -1, -1,
- -1, -1, -1, 5, 6, 160, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
- 22, -1, 24, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 37, -1, -1, -1, -1,
- -1, -1, -1, -1, 5, 6, 48, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
- 21, 22, -1, 24, 5, 6, -1, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
- 21, 22, -1, 24, -1, -1, -1, 48, -1, -1,
- -1, -1, -1, -1, -1, -1, 37, -1, -1, -1,
- -1, -1, -1, -1, -1, 5, 6, 48, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- -1, 21, 22, -1, 24, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 48, -1,
- -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
- 162, 5, 6, -1, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, -1, 21, 22, -1,
- 24, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 154, -1, -1, 157, -1, 159, 160,
- -1, 162, -1, -1, 48, -1, -1, -1, -1, -1,
- -1, -1, -1, 154, -1, -1, 157, -1, -1, 160,
- -1, 162, 5, 6, -1, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
- -1, 24, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 154, -1, -1, 157, -1, -1,
- 160, -1, 162, 5, 6, 48, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
- 22, -1, 24, 5, 6, -1, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
- 22, -1, 24, -1, -1, -1, 48, -1, -1, -1,
- 154, -1, -1, 157, -1, -1, 160, -1, 162, -1,
- -1, -1, -1, -1, 5, 6, 48, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
- 21, 22, -1, 24, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 48, -1, -1,
- -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
- 162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
- 162, -1, -1, -1, -1, 35, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 49,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 59,
- 60, -1, -1, 154, -1, -1, 157, -1, -1, 160,
- -1, 162, 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, 103, 104, 105, 106, 107, -1, -1,
- 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 150, 151
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 1, 1, 2, 0,
+ 2, 0, 3, 2, 0, 1, 0, 3, 1, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 4, 5, 5, 3, 2, 5, 4, 2, 1,
+ 3, 1, 3, 1, 0, 4, 3, 3, 4, 4,
+ 3, 6, 5, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 6, 5, 8, 6, 6, 6, 7,
+ 7, 6, 6, 8, 8, 3, 1, 1, 1, 1,
+ 2, 2, 4, 2, 1, 4, 2, 4, 0, 7,
+ 0, 7, 0, 7, 0, 7, 3, 4, 0, 1,
+ 1, 1, 3, 3, 3, 3, 3, 3, 1, 0,
+ 1, 1, 1, 0, 2, 3, 1, 1, 3, 1,
+ 0, 8, 1, 1, 3, 1, 1, 2, 0, 1,
+ 1, 0, 0, 5, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 1, 5, 1, 1, 1,
+ 1, 2, 2, 2, 3, 2, 0, 1, 1, 1,
+ 2, 2, 3, 9, 9, 8, 13, 1, 1, 6,
+ 5, 2, 6, 7, 1, 3, 1, 0, 2, 1,
+ 5, 5, 5, 6, 6, 2, 4, 4, 6, 4,
+ 4, 4, 4, 6, 6, 2, 7, 1, 2, 0,
+ 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/share/bison.simple"
-/* This file comes from bison-1.28. */
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned short int yydefact[] =
+{
+ 198, 0, 90, 184, 1, 183, 231, 83, 84, 85,
+ 86, 87, 88, 89, 0, 91, 256, 180, 181, 256,
+ 210, 211, 0, 0, 0, 90, 0, 186, 228, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 0, 257,
+ 253, 82, 225, 226, 227, 252, 0, 0, 0, 0,
+ 196, 0, 0, 0, 0, 0, 0, 0, 81, 229,
+ 230, 232, 199, 182, 98, 2, 3, 111, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 128, 0, 0, 0, 0, 247, 0, 0, 110, 127,
+ 114, 248, 129, 222, 223, 224, 301, 255, 0, 0,
+ 0, 0, 209, 197, 187, 185, 177, 178, 0, 0,
+ 0, 0, 91, 130, 0, 0, 0, 113, 135, 139,
+ 0, 0, 144, 138, 300, 0, 279, 0, 0, 0,
+ 0, 91, 268, 258, 259, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 52,
+ 53, 54, 55, 20, 21, 22, 23, 24, 25, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 68, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 0, 0, 0, 0,
+ 0, 267, 254, 91, 271, 0, 297, 204, 201, 200,
+ 202, 203, 205, 208, 0, 192, 194, 190, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 0,
+ 0, 0, 0, 188, 233, 0, 0, 0, 0, 0,
+ 134, 220, 143, 141, 0, 0, 285, 278, 261, 260,
+ 0, 0, 72, 76, 71, 75, 70, 74, 69, 73,
+ 77, 78, 0, 0, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 0, 50, 51, 46, 47, 48,
+ 49, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 0, 101, 101, 306, 0, 0, 295, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 206, 106, 106, 106, 160, 161,
+ 4, 5, 158, 159, 162, 157, 153, 154, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 156, 155, 106, 112, 112, 137,
+ 0, 140, 219, 213, 216, 217, 0, 0, 131, 236,
+ 237, 238, 243, 239, 240, 241, 242, 234, 0, 245,
+ 250, 249, 251, 0, 262, 0, 0, 0, 0, 0,
+ 302, 0, 304, 299, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 207, 0, 193, 195, 191, 0, 0, 0, 0,
+ 0, 0, 0, 146, 176, 0, 0, 0, 150, 0,
+ 147, 0, 0, 0, 0, 0, 189, 132, 133, 136,
+ 212, 214, 0, 104, 142, 235, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 309, 0, 0,
+ 0, 289, 292, 0, 0, 290, 291, 0, 0, 0,
+ 286, 287, 0, 307, 0, 0, 0, 108, 106, 0,
+ 0, 299, 0, 0, 0, 0, 0, 145, 135, 114,
+ 0, 148, 149, 0, 0, 0, 0, 0, 218, 215,
+ 105, 99, 0, 244, 0, 0, 277, 0, 0, 101,
+ 102, 101, 274, 298, 0, 0, 0, 0, 0, 280,
+ 281, 282, 277, 0, 103, 109, 107, 0, 0, 0,
+ 0, 0, 0, 0, 175, 152, 0, 0, 0, 0,
+ 0, 0, 0, 221, 0, 0, 0, 276, 0, 283,
+ 284, 0, 303, 305, 0, 0, 0, 288, 293, 294,
+ 0, 308, 0, 0, 164, 0, 0, 0, 0, 151,
+ 0, 0, 0, 0, 0, 100, 246, 0, 0, 0,
+ 275, 272, 0, 296, 0, 0, 0, 172, 0, 0,
+ 166, 167, 168, 171, 163, 0, 265, 0, 0, 0,
+ 273, 169, 170, 0, 0, 0, 263, 0, 264, 0,
+ 0, 165, 173, 174, 0, 0, 0, 0, 0, 0,
+ 270, 0, 0, 269, 266
+};
- 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.
+/* YYDEFGOTO[NTERM-NUM]. */
+static const short int yydefgoto[] =
+{
+ -1, 85, 312, 329, 330, 331, 264, 281, 332, 333,
+ 219, 220, 252, 221, 25, 15, 37, 523, 370, 457,
+ 481, 393, 458, 86, 87, 222, 89, 90, 120, 234,
+ 404, 359, 405, 108, 1, 2, 3, 336, 307, 305,
+ 306, 63, 200, 50, 103, 204, 91, 421, 344, 345,
+ 346, 38, 95, 16, 44, 17, 61, 18, 28, 112,
+ 426, 360, 92, 362, 492, 19, 40, 41, 191, 192,
+ 578, 97, 287, 527, 528, 193, 194, 437, 195, 196
+};
- 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.
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -555
+static const short int yypact[] =
+{
+ -555, 136, 58, 247, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, 96, 181, 141, -555, -555, -9,
+ -555, -555, 16, 7, 114, 65, 39, -555, 50, 188,
+ 210, -555, -555, -555, -555, -555, -555, 1357, -19, -555,
+ -555, 134, -555, -555, -555, -555, 68, 69, 70, 73,
+ -555, 60, 188, 1357, 4, 4, 4, 4, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, 63, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, 222, 224, 1, 171, -555, 134, 84, -555, -555,
+ -103, -555, -555, -555, -555, -555, 1611, -555, 216, 66,
+ 238, 219, 233, -555, -555, -555, -555, -555, 1418, 1418,
+ 1418, 1459, 181, -555, 100, 101, 737, -555, -555, -103,
+ -112, 105, 803, -555, -555, 1418, -555, 202, 1479, 13,
+ 221, 181, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, -555, 77,
+ 377, 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418,
+ 1418, 1418, 1418, -555, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, -555, -555, 1418, 1418, 1418, 1418,
+ 1418, -555, -555, 181, -555, 33, -555, -555, -555, -555,
+ -555, -555, -555, -555, -15, -555, -555, -555, 36, 158,
+ 262, 164, 264, 167, 266, 169, 268, 269, 270, 204,
+ 271, 274, 579, -555, -555, 1418, 1418, 121, -67, 1418,
+ -555, 1199, -555, 120, 127, 920, -555, -555, 63, -555,
+ 920, 920, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, -555, 920, 1357, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, 1418, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, 1418, 142, 143, -555, 920, 147, 153, 154, 155,
+ 157, 165, 166, 168, 170, 920, 920, 920, 173, 275,
+ 1357, 1418, 1418, 293, -555, 174, 174, 174, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, 77, 377,
+ 175, 177, 180, 182, 183, 1240, 1520, 757, 296, 192,
+ 193, 199, 203, 207, -555, -555, 174, -45, -71, -555,
+ 161, -103, -555, 134, -555, 176, 209, 1260, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, 261, 1459, -555,
+ -555, -555, -555, 206, -555, 213, 920, 920, 920, -2,
+ -555, 0, -555, 215, 920, 179, 1418, 1418, 1418, 1418,
+ 1418, 1418, 1418, 217, 218, 223, 1418, 1418, 920, 920,
+ 226, -555, -17, -555, -555, -555, 214, 220, 1459, 1459,
+ 1459, 1459, 1459, -555, -555, -13, 778, -94, -555, -40,
+ -555, 1459, 1459, 1459, 1459, 1459, -555, -555, -555, -555,
+ -555, -555, 1301, 346, -555, -555, 357, -69, 361, 362,
+ 229, 234, 235, 920, 382, 920, 1418, -555, 236, 920,
+ 237, -555, -555, 239, 240, -555, -555, 920, 920, 920,
+ -555, -555, 241, -555, 1418, 367, 390, -555, 174, 1459,
+ 1459, 215, 242, 245, 248, 249, 1459, -555, 254, -16,
+ -8, -555, -555, 250, 253, 263, 272, 364, -555, -555,
+ -555, 366, 273, -555, 920, 920, 1418, 920, 920, 276,
+ -555, 276, -555, 279, 920, 280, 1418, 1418, 1418, -555,
+ -555, -555, 1418, 920, -555, -555, -555, 281, 282, 283,
+ 1459, 1459, 1459, 1459, -555, -555, 284, 1459, 1459, 1459,
+ 1459, 1418, 423, -555, 416, 288, 285, 279, 290, -555,
+ -555, 391, -555, -555, 1418, 294, 920, -555, -555, -555,
+ 291, -555, 1459, 1459, -555, 299, 298, 302, 303, -555,
+ 301, 306, 307, 308, 310, -555, -555, 437, 15, 432,
+ -555, -555, 312, -555, 316, 319, 1459, -555, 1459, 1459,
+ -555, -555, -555, -555, -555, 920, -555, 1046, 64, 460,
+ -555, -555, -555, 326, 329, 331, -555, 335, -555, 1046,
+ 920, -555, -555, -555, 468, 337, 132, 920, 470, 472,
+ -555, 920, 920, -555, -555
+};
- 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+/* YYPGOTO[NTERM-NUM]. */
+static const short int yypgoto[] =
+{
+ -555, -555, -555, 398, 399, 400, 198, 200, 402, 403,
+ -128, -127, -525, -555, 476, 493, -111, -555, -276, 97,
+ -555, -298, -555, -47, -555, -37, -555, -60, -62, -555,
+ -99, 300, -308, 61, -555, -555, -555, -555, -555, -555,
+ -555, 469, -555, -555, -555, -555, 8, -555, 102, -555,
+ -555, 411, -555, -555, -555, -555, -555, 523, -555, -555,
+ -555, -554, -11, 112, -124, -555, 508, -555, -68, -555,
+ -555, -555, -555, 93, 28, -555, -555, 71, -555, -555
+};
-/* 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. */
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -180
+static const short int yytable[] =
+{
+ 88, 236, 250, 251, 239, 115, 105, 372, 394, 395,
+ 93, 26, 223, 433, 39, 435, 88, 455, 407, 409,
+ 253, 42, 240, 587, 119, 242, 243, 244, 245, 246,
+ 247, 248, 249, 577, 241, 595, 106, 107, 416, 284,
+ 456, 229, 288, 289, 290, 291, 292, 293, 294, 26,
+ 427, 230, -112, 589, 228, 434, 119, 434, -179, 466,
+ 233, 123, 119, 308, 309, 298, 299, 471, 46, 47,
+ 48, 205, 206, 207, 242, 243, 244, 245, 246, 247,
+ 248, 249, 300, 5, 466, 53, 229, 49, 235, 6,
+ 418, 235, 483, 123, 121, 59, 340, 60, 470, 7,
+ 8, 9, 10, 11, 12, 13, 7, 8, 9, 10,
+ 54, 12, 55, 466, 417, 56, 109, 110, 111, 123,
+ 14, 198, 199, 472, 282, 283, 235, 285, 286, 235,
+ 235, 235, 235, 235, 235, 235, 4, -139, 303, -112,
+ 466, 301, 302, 94, 304, 466, 467, -139, 123, 295,
+ 296, 297, 235, 235, 43, 516, 20, 29, 21, 51,
+ 506, -72, -72, 116, 39, 337, 338, -71, -71, 341,
+ -70, -70, -69, -69, 576, 52, 65, 66, 390, 117,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 58, 79, 20, 343, 21, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 366, 310, 311, 133,
+ 134, 335, 62, 532, 64, 533, 88, 102, -113, 80,
+ 98, 99, 100, 588, 361, 101, 113, 367, 114, 361,
+ 361, 242, 243, 244, 245, 246, 247, 248, 249, 122,
+ 197, 361, 201, 202, 368, 30, 31, 32, 33, 34,
+ 35, 36, 440, 388, 442, 443, 444, 203, 225, 226,
+ 231, 237, 450, 88, 389, 235, -76, -82, -75, 20,
+ -74, 21, -73, 347, 361, 313, -79, -80, 6, -82,
+ -82, 314, 339, 348, 361, 361, 361, 341, -82, -82,
+ -82, -82, -82, -82, -82, 369, 371, -82, 22, 461,
+ 462, 463, 464, 465, 374, 23, 375, 376, 377, 24,
+ 378, 387, 473, 474, 475, 476, 477, 391, 379, 380,
+ 410, 381, 419, 382, 425, 81, 386, 392, 82, 422,
+ 398, 83, 399, 84, 118, 400, 439, 401, 402, 235,
+ 441, 235, 235, 235, 445, 446, 469, 411, 412, 235,
+ 451, 420, 363, 364, 413, 361, 361, 361, 414, 428,
+ 507, 508, 415, 361, 365, 423, 429, 514, 436, 459,
+ 447, 448, 537, 538, 539, 460, 449, 361, 361, 454,
+ 455, 482, 484, 485, 486, 343, 490, 487, 488, 494,
+ 496, 504, 497, 498, 505, 510, 502, 373, 511, 235,
+ 521, 512, 513, 517, 265, 266, 518, 383, 384, 385,
+ 560, 545, 546, 547, 548, 515, 519, 503, 550, 551,
+ 552, 553, 361, 522, 361, 520, 524, 555, 361, 531,
+ 250, 251, 534, 536, 542, 543, 361, 361, 361, 544,
+ 556, 557, 558, 564, 565, 549, 559, 563, 434, 235,
+ 250, 251, 566, 561, 567, 568, 569, 570, 575, 235,
+ 235, 235, 571, 572, 573, 235, 574, 583, 579, 584,
+ 585, 580, 581, 361, 361, 582, 361, 361, 430, 431,
+ 432, 590, 591, 361, 554, 592, 438, 593, 594, 597,
+ 598, 601, 361, 602, 186, 187, 188, 235, 189, 190,
+ 452, 453, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 396, 96, 57, 397,
+ 480, 104, 334, 224, 479, 361, 27, 45, 599, 493,
+ 540, 0, 509, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 489, 0, 491, 0, 0,
+ 0, 495, 0, 0, 0, 0, 0, 0, 0, 499,
+ 500, 501, 0, 0, 361, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 361,
+ 0, 0, 0, 0, 65, 66, 361, 0, 0, 0,
+ 361, 361, 0, 0, 0, 0, 525, 526, 0, 529,
+ 530, 20, 0, 21, 0, 315, 535, 0, 0, 0,
+ 0, 0, 0, 0, 0, 541, 0, 316, 317, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 562, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 318, 319, 0, 0, 0, 586, 0, 320,
+ 0, 321, 0, 322, 323, 324, 0, 0, 0, 0,
+ 0, 0, 596, 0, 0, 0, 0, 0, 0, 600,
+ 0, 0, 0, 603, 604, 0, 0, 0, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 0, 0, 0, 0, 0, 325, 0, 0, 326,
+ 0, 327, 65, 66, 328, 117, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 0, 79, 20,
+ 0, 21, 65, 66, 0, 117, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 218, 0, 79, 20,
+ 0, 21, 0, 65, 66, 80, 117, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 217, 218, 0, 79,
+ 20, 0, 21, 0, 0, 80, 0, 0, 65, 66,
+ 0, 117, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 0, 79, 20, 80, 21, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 232, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 81, 0, 0, 82, 0, 0, 83, 0, 84,
+ 227, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 81, 0, 0, 82, 0, 0, 83, 0, 84,
+ 408, 0, 0, 349, 350, 65, 66, 351, 0, 0,
+ 0, 0, 81, 0, 0, 82, 0, 0, 83, 0,
+ 84, 468, 20, 0, 21, 0, 352, 353, 354, 0,
+ 0, 0, 0, 0, 0, 0, 0, 81, 355, 356,
+ 82, 0, 0, 83, 0, 84, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 357, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 318, 319, 0, 0, 0, 0, 0,
+ 320, 0, 321, 0, 322, 323, 324, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 349,
+ 350, 0, 0, 351, 0, 0, 0, 0, 0, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 352, 353, 354, 0, 0, 0, 0, 0,
+ 358, 0, 0, 0, 355, 356, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 357, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 318,
+ 319, 0, 0, 0, 0, 0, 320, 0, 321, 0,
+ 322, 323, 324, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 0, 0,
+ 0, 0, 0, 0, 65, 66, 358, 117, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 0,
+ 79, 20, 0, 21, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 342, 0, 0, 0,
+ 0, 0, 0, 0, 0, 65, 66, 80, 117, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ 0, 79, 20, 0, 21, 65, 66, 0, 117, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 0, 79, 20, 0, 21, 0, 0, 0, 80, 0,
+ 0, 0, 0, 0, 0, 0, 0, 424, 0, 0,
+ 0, 0, 0, 0, 0, 0, 65, 66, 80, 117,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 0, 79, 20, 0, 21, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 478, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
+ 0, 0, 0, 81, 0, 0, 82, 0, 0, 83,
+ 0, 84, 65, 66, 0, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 0, 79, 20,
+ 0, 21, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 81, 0, 0, 82, 0, 403,
+ 83, 0, 84, 0, 0, 80, 0, 0, 0, 0,
+ 0, 0, 0, 0, 81, 0, 0, 82, 0, 0,
+ 83, 0, 84, 65, 66, 0, 117, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 0, 79,
+ 20, 0, 21, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 81, 0, 0, 82, 0,
+ 0, 83, 0, 84, 65, 66, 80, 117, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 217, 218, 0,
+ 79, 20, 0, 21, 65, 66, 0, 238, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 0,
+ 79, 20, 0, 21, 0, 0, 0, 80, 0, 0,
+ 0, 81, 0, 0, 82, 0, 0, 83, 0, 84,
+ 0, 0, 0, 0, 0, 65, 66, 80, 117, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ 0, 79, 20, 0, 21, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
+ 0, 0, 81, 0, 0, 82, 0, 0, 83, 0,
+ 84, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 81, 0, 0, 82, 0, 0, 83,
+ 0, 84, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 81, 0, 0, 82, 0, 0, 83,
+ 0, 84, 0, 0, 0, 0, 124, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 126, 127, 0, 0, 81, 0, 0, 82, 0, 0,
+ 83, 0, 406, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 0,
+ 0, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185
+};
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C. */
-/* This used to test MSDOS, but that is a bad idea
- since that symbol is in the user namespace. */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for malloc.h, which pollutes the namespace;
- instead, just don't use alloca. */
-#include <malloc.h>
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
- So I turned it off. rms, 2 May 1997. */
-/* #include <malloc.h> */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
- and on HPUX 10. Eventually we can turn this on. */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
-
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC malloc
-#endif
+static const short int yycheck[] =
+{
+ 37, 125, 130, 130, 128, 4, 53, 283, 306, 307,
+ 29, 3, 111, 15, 23, 15, 53, 34, 326, 327,
+ 131, 30, 9, 577, 84, 10, 11, 12, 13, 14,
+ 15, 16, 17, 558, 21, 589, 32, 33, 336, 163,
+ 57, 153, 166, 167, 168, 169, 170, 171, 172, 41,
+ 358, 163, 155, 578, 116, 57, 116, 57, 0, 153,
+ 122, 164, 122, 27, 28, 189, 190, 161, 52, 53,
+ 54, 108, 109, 110, 10, 11, 12, 13, 14, 15,
+ 16, 17, 193, 25, 153, 20, 153, 71, 125, 31,
+ 161, 128, 161, 164, 86, 45, 163, 47, 406, 41,
+ 42, 43, 44, 45, 46, 47, 41, 42, 43, 44,
+ 45, 46, 47, 153, 159, 50, 55, 56, 57, 164,
+ 62, 55, 56, 163, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 0, 153, 153, 155,
+ 153, 108, 109, 162, 159, 153, 159, 163, 164, 186,
+ 187, 188, 189, 190, 163, 163, 22, 61, 24, 152,
+ 458, 3, 4, 162, 23, 225, 226, 3, 4, 229,
+ 3, 4, 3, 4, 159, 61, 5, 6, 302, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 152, 21, 22, 231, 24, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 253, 3, 4, 77,
+ 78, 222, 24, 489, 4, 491, 253, 157, 155, 48,
+ 152, 152, 152, 159, 235, 152, 4, 264, 4, 240,
+ 241, 10, 11, 12, 13, 14, 15, 16, 17, 155,
+ 24, 252, 4, 24, 281, 64, 65, 66, 67, 68,
+ 69, 70, 376, 300, 378, 379, 380, 24, 158, 158,
+ 155, 59, 386, 300, 301, 302, 4, 20, 4, 22,
+ 4, 24, 4, 153, 285, 4, 7, 7, 31, 32,
+ 33, 7, 161, 156, 295, 296, 297, 347, 41, 42,
+ 43, 44, 45, 46, 47, 153, 153, 50, 51, 398,
+ 399, 400, 401, 402, 157, 58, 153, 153, 153, 62,
+ 153, 36, 411, 412, 413, 414, 415, 24, 153, 153,
+ 24, 153, 161, 153, 63, 154, 153, 153, 157, 153,
+ 155, 160, 155, 162, 163, 155, 157, 155, 155, 376,
+ 377, 378, 379, 380, 381, 382, 406, 155, 155, 386,
+ 387, 343, 240, 241, 155, 366, 367, 368, 155, 153,
+ 459, 460, 155, 374, 252, 156, 153, 466, 153, 155,
+ 153, 153, 496, 497, 498, 155, 153, 388, 389, 153,
+ 34, 24, 21, 21, 155, 422, 4, 153, 153, 153,
+ 153, 24, 153, 153, 4, 153, 155, 285, 153, 436,
+ 36, 153, 153, 153, 27, 28, 153, 295, 296, 297,
+ 534, 510, 511, 512, 513, 161, 153, 454, 517, 518,
+ 519, 520, 433, 57, 435, 153, 153, 4, 439, 153,
+ 558, 558, 153, 153, 153, 153, 447, 448, 449, 156,
+ 24, 153, 157, 542, 543, 161, 156, 156, 57, 486,
+ 578, 578, 153, 159, 156, 153, 153, 156, 21, 496,
+ 497, 498, 156, 156, 156, 502, 156, 566, 36, 568,
+ 569, 159, 156, 484, 485, 156, 487, 488, 366, 367,
+ 368, 21, 156, 494, 521, 156, 374, 156, 153, 21,
+ 153, 21, 503, 21, 96, 96, 96, 534, 96, 96,
+ 388, 389, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 318, 41, 25, 319,
+ 423, 52, 222, 112, 422, 536, 3, 19, 596, 436,
+ 502, -1, 461, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 433, -1, 435, -1, -1,
+ -1, 439, -1, -1, -1, -1, -1, -1, -1, 447,
+ 448, 449, -1, -1, 575, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 590,
+ -1, -1, -1, -1, 5, 6, 597, -1, -1, -1,
+ 601, 602, -1, -1, -1, -1, 484, 485, -1, 487,
+ 488, 22, -1, 24, -1, 26, 494, -1, -1, -1,
+ -1, -1, -1, -1, -1, 503, -1, 38, 39, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 536, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, -1, -1, -1, 575, -1, 110,
+ -1, 112, -1, 114, 115, 116, -1, -1, -1, -1,
+ -1, -1, 590, -1, -1, -1, -1, -1, -1, 597,
+ -1, -1, -1, 601, 602, -1, -1, -1, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, -1, -1, -1, -1, -1, 157, -1, -1, 160,
+ -1, 162, 5, 6, 165, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
+ -1, 24, 5, 6, -1, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
+ -1, 24, -1, 5, 6, 48, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
+ 22, -1, 24, -1, -1, 48, -1, -1, 5, 6,
+ -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, -1, 21, 22, 48, 24, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 37, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 48, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
+ 163, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
+ 163, -1, -1, 3, 4, 5, 6, 7, -1, -1,
+ -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
+ 162, 163, 22, -1, 24, -1, 26, 27, 28, -1,
+ -1, -1, -1, -1, -1, -1, -1, 154, 38, 39,
+ 157, -1, -1, 160, -1, 162, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 61, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, -1, -1, -1, -1, -1,
+ 110, -1, 112, -1, 114, 115, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
+ 4, -1, -1, 7, -1, -1, -1, -1, -1, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 26, 27, 28, -1, -1, -1, -1, -1,
+ 160, -1, -1, -1, 38, 39, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 61, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, -1, -1, -1, -1, -1, 110, -1, 112, -1,
+ 114, 115, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, -1, -1,
+ -1, -1, -1, -1, 5, 6, 160, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
+ 21, 22, -1, 24, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 37, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5, 6, 48, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ -1, 21, 22, -1, 24, 5, 6, -1, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ -1, 21, 22, -1, 24, -1, -1, -1, 48, -1,
+ -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5, 6, 48, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, -1, 21, 22, -1, 24, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 37, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 48,
+ -1, -1, -1, 154, -1, -1, 157, -1, -1, 160,
+ -1, 162, 5, 6, -1, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
+ -1, 24, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 154, -1, -1, 157, -1, 159,
+ 160, -1, 162, -1, -1, 48, -1, -1, -1, -1,
+ -1, -1, -1, -1, 154, -1, -1, 157, -1, -1,
+ 160, -1, 162, 5, 6, -1, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
+ 22, -1, 24, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 154, -1, -1, 157, -1,
+ -1, 160, -1, 162, 5, 6, 48, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
+ 21, 22, -1, 24, 5, 6, -1, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
+ 21, 22, -1, 24, -1, -1, -1, 48, -1, -1,
+ -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
+ -1, -1, -1, -1, -1, 5, 6, 48, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ -1, 21, 22, -1, 24, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 48, -1,
+ -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
+ 162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 154, -1, -1, 157, -1, -1, 160,
+ -1, 162, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 154, -1, -1, 157, -1, -1, 160,
+ -1, 162, -1, -1, -1, -1, 35, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 49, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 59, 60, -1, -1, 154, -1, -1, 157, -1, -1,
+ 160, -1, 162, 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, 103, 104, 105, 106, 107, -1,
+ -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151
+};
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 200, 201, 202, 0, 25, 31, 41, 42, 43,
+ 44, 45, 46, 47, 62, 181, 219, 221, 223, 231,
+ 22, 24, 51, 58, 62, 180, 212, 223, 224, 61,
+ 64, 65, 66, 67, 68, 69, 70, 182, 217, 23,
+ 232, 233, 30, 163, 220, 232, 52, 53, 54, 71,
+ 209, 152, 61, 20, 45, 47, 50, 181, 152, 45,
+ 47, 222, 24, 207, 4, 5, 6, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 21,
+ 48, 154, 157, 160, 162, 167, 189, 190, 191, 192,
+ 193, 212, 228, 29, 162, 218, 180, 237, 152, 152,
+ 152, 152, 157, 210, 207, 189, 32, 33, 199, 199,
+ 199, 199, 225, 4, 4, 4, 162, 8, 163, 193,
+ 194, 212, 155, 164, 35, 49, 59, 60, 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, 103,
+ 104, 105, 106, 107, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 169, 170, 171, 174,
+ 175, 234, 235, 241, 242, 244, 245, 24, 55, 56,
+ 208, 4, 24, 24, 211, 191, 191, 191, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 176,
+ 177, 179, 191, 196, 217, 158, 158, 163, 194, 153,
+ 163, 155, 37, 194, 195, 191, 230, 59, 8, 230,
+ 9, 21, 10, 11, 12, 13, 14, 15, 16, 17,
+ 176, 177, 178, 182, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 172, 27, 28, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 173, 191, 191, 230, 191, 191, 238, 230, 230,
+ 230, 230, 230, 230, 230, 191, 191, 191, 230, 230,
+ 182, 108, 109, 153, 159, 205, 206, 204, 27, 28,
+ 3, 4, 168, 4, 7, 26, 38, 39, 103, 104,
+ 110, 112, 114, 115, 116, 157, 160, 162, 165, 169,
+ 170, 171, 174, 175, 197, 228, 203, 193, 193, 161,
+ 163, 193, 37, 191, 214, 215, 216, 153, 156, 3,
+ 4, 7, 26, 27, 28, 38, 39, 61, 160, 197,
+ 227, 228, 229, 229, 229, 229, 189, 191, 191, 153,
+ 184, 153, 184, 229, 157, 153, 153, 153, 153, 153,
+ 153, 153, 153, 229, 229, 229, 153, 36, 189, 191,
+ 230, 24, 153, 187, 187, 187, 172, 173, 155, 155,
+ 155, 155, 155, 159, 196, 198, 162, 198, 163, 198,
+ 24, 155, 155, 155, 155, 155, 187, 159, 161, 161,
+ 212, 213, 153, 156, 37, 63, 226, 198, 153, 153,
+ 229, 229, 229, 15, 57, 15, 153, 243, 229, 157,
+ 230, 191, 230, 230, 230, 191, 191, 153, 153, 153,
+ 230, 191, 229, 229, 153, 34, 57, 185, 188, 155,
+ 155, 196, 196, 196, 196, 196, 153, 159, 163, 193,
+ 198, 161, 163, 196, 196, 196, 196, 196, 37, 214,
+ 185, 186, 24, 161, 21, 21, 155, 153, 153, 229,
+ 4, 229, 230, 239, 153, 229, 153, 153, 153, 229,
+ 229, 229, 155, 191, 24, 4, 187, 196, 196, 243,
+ 153, 153, 153, 153, 196, 161, 163, 153, 153, 153,
+ 153, 36, 57, 183, 153, 229, 229, 239, 240, 229,
+ 229, 153, 184, 184, 153, 229, 153, 230, 230, 230,
+ 240, 229, 153, 153, 156, 196, 196, 196, 196, 161,
+ 196, 196, 196, 196, 191, 4, 24, 153, 157, 156,
+ 230, 159, 229, 156, 196, 196, 153, 156, 153, 153,
+ 156, 156, 156, 156, 156, 21, 159, 178, 236, 36,
+ 159, 156, 156, 196, 196, 196, 229, 227, 159, 178,
+ 21, 156, 156, 156, 153, 227, 229, 21, 153, 234,
+ 229, 21, 21, 229, 229
+};
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
+#define YYEMPTY (-2)
#define YYEOF 0
+
#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
+
#define YYFAIL goto yyerrlab
+
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
+
+#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
while (0)
+
#define YYTERROR 1
#define YYERRCODE 256
-#ifndef YYPURE
-#define YYLEX yylex()
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
#endif
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
-#else /* not YYLSP_NEEDED */
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
+# define YYLEX yylex (YYLEX_PARAM)
#else
-#define YYLEX yylex(&yylval)
+# define YYLEX yylex ()
#endif
-#endif /* not YYLSP_NEEDED */
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short int *bottom, short int *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short int *bottom;
+ short int *top;
#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
-/* If nonreentrant, generate the variables here */
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
-#ifndef YYPURE
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
#endif
+{
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
+}
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
-#endif
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
+/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
+# define YYINITDEPTH 200
#endif
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
+# define YYMAXDEPTH 10000
#endif
+
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
{
- register char *f = from;
- register char *t = to;
- register int i = count;
+ const char *yys = yystr;
- while (i-- > 0)
- *t++ = *f++;
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
-#else /* __cplusplus */
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
{
- register char *t = to;
- register char *f = from;
- register int i = count;
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
- while (i-- > 0)
- *t++ = *f++;
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
}
+# endif
+
+#endif /* YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
-#line 217 "/usr/share/bison.simple"
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
+/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
+#else
+int yyparse ();
#endif
-#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol. */
+int yychar;
+
+/* The semantic value of the look-ahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
+yyparse ()
+
+#endif
+#endif
{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ int yystate;
+ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ short int *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
#define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
- int yystacksize = YYINITDEPTH;
- int yyfree_stacks = 0;
+ YYSIZE_T yystacksize = YYINITDEPTH;
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
-#endif
-#endif
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
int yylen;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
+ YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
@@ -2799,718 +3497,745 @@ yyparse(YYPARSE_PARAM_ARG)
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
- yyssp = yyss - 1;
+ yyssp = yyss;
yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
+ goto yysetstate;
- *++yyssp = yystate;
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to reallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
+ yysetstate:
+ *yyssp = yystate;
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
/* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
+ YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
-
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short int *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
/* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 2;
- }
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
+ if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
- yyfree_stacks = 1;
-#endif
- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
- size * (unsigned int) sizeof (*yyssp));
- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
- size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
- size * (unsigned int) sizeof (*yylsp));
-#endif
+
+ {
+ short int *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
#endif /* no yyoverflow */
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
- if (yyssp >= yyss + yystacksize - 1)
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
- yybackup:
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
+/* Read a look-ahead token if we need one and don't already have one. */
/* yyresume: */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
- if (yyn == YYFLAG)
+ if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
+ /* Not known => get a look-ahead token if don't already have one. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
+ YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
+ if (yychar <= YYEOF)
{
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
goto yydefault;
-
yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
+ if (yyn <= 0)
{
- if (yyn == YYFLAG)
+ if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- else if (yyn == 0)
- goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
yystate = yyn;
goto yynewstate;
-/* Do the default action for the current state. */
-yydefault:
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
+ goto yyreduce;
+
-/* Do a reduction. yyn is the number of a rule to reduce with. */
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
yyreduce:
+ /* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-#if YYDEBUG != 0
- if (yydebug)
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 3:
+#line 1595 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range!
+ error("Value too large for type");
+ (yyval.SIntVal) = (int32_t)(yyvsp[0].UIntVal);
+ ;}
+ break;
+
+ case 5:
+#line 1604 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range!
+ error("Value too large for type");
+ (yyval.SInt64Val) = (int64_t)(yyvsp[0].UInt64Val);
+ ;}
+ break;
+
+ case 26:
+#line 1626 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_EQ; ;}
+ break;
+
+ case 27:
+#line 1626 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_NE; ;}
+ break;
+
+ case 28:
+#line 1627 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_SLT; ;}
+ break;
+
+ case 29:
+#line 1627 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_SGT; ;}
+ break;
+
+ case 30:
+#line 1628 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_SLE; ;}
+ break;
+
+ case 31:
+#line 1628 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_SGE; ;}
+ break;
+
+ case 32:
+#line 1629 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_ULT; ;}
+ break;
+
+ case 33:
+#line 1629 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_UGT; ;}
+ break;
+
+ case 34:
+#line 1630 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_ULE; ;}
+ break;
+
+ case 35:
+#line 1630 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_UGE; ;}
+ break;
+
+ case 36:
+#line 1634 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OEQ; ;}
+ break;
+
+ case 37:
+#line 1634 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_ONE; ;}
+ break;
+
+ case 38:
+#line 1635 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OLT; ;}
+ break;
+
+ case 39:
+#line 1635 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OGT; ;}
+ break;
+
+ case 40:
+#line 1636 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OLE; ;}
+ break;
+
+ case 41:
+#line 1636 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OGE; ;}
+ break;
+
+ case 42:
+#line 1637 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_ORD; ;}
+ break;
+
+ case 43:
+#line 1637 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UNO; ;}
+ break;
+
+ case 44:
+#line 1638 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UEQ; ;}
+ break;
+
+ case 45:
+#line 1638 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UNE; ;}
+ break;
+
+ case 46:
+#line 1639 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_ULT; ;}
+ break;
+
+ case 47:
+#line 1639 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UGT; ;}
+ break;
+
+ case 48:
+#line 1640 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_ULE; ;}
+ break;
+
+ case 49:
+#line 1640 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UGE; ;}
+ break;
+
+ case 50:
+#line 1641 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_TRUE; ;}
+ break;
+
+ case 51:
+#line 1642 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_FALSE; ;}
+ break;
+
+ case 81:
+#line 1673 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
- int i;
+ (yyval.StrVal) = (yyvsp[-1].StrVal);
+ ;}
+ break;
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
+ case 82:
+#line 1676 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.StrVal) = 0;
+ ;}
+ break;
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
+ case 83:
+#line 1681 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
+ break;
+ case 84:
+#line 1682 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
+ break;
- switch (yyn) {
+ case 85:
+#line 1683 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
+ break;
-case 2:
-#line 1595 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range!
- error("Value too large for type");
- yyval.SIntVal = (int32_t)yyvsp[0].UIntVal;
- ;
- break;}
-case 4:
-#line 1604 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range!
- error("Value too large for type");
- yyval.SInt64Val = (int64_t)yyvsp[0].UInt64Val;
- ;
- break;}
-case 25:
-#line 1626 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_EQ; ;
- break;}
-case 26:
-#line 1626 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_NE; ;
- break;}
-case 27:
-#line 1627 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_SLT; ;
- break;}
-case 28:
-#line 1627 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_SGT; ;
- break;}
-case 29:
-#line 1628 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_SLE; ;
- break;}
-case 30:
-#line 1628 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_SGE; ;
- break;}
-case 31:
-#line 1629 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_ULT; ;
- break;}
-case 32:
-#line 1629 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_UGT; ;
- break;}
-case 33:
-#line 1630 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_ULE; ;
- break;}
-case 34:
-#line 1630 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_UGE; ;
- break;}
-case 35:
-#line 1634 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OEQ; ;
- break;}
-case 36:
-#line 1634 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_ONE; ;
- break;}
-case 37:
-#line 1635 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OLT; ;
- break;}
-case 38:
-#line 1635 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OGT; ;
- break;}
-case 39:
-#line 1636 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OLE; ;
- break;}
-case 40:
-#line 1636 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OGE; ;
- break;}
-case 41:
-#line 1637 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_ORD; ;
- break;}
-case 42:
-#line 1637 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UNO; ;
- break;}
-case 43:
-#line 1638 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UEQ; ;
- break;}
-case 44:
-#line 1638 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UNE; ;
- break;}
-case 45:
-#line 1639 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_ULT; ;
- break;}
-case 46:
-#line 1639 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UGT; ;
- break;}
-case 47:
-#line 1640 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_ULE; ;
- break;}
-case 48:
-#line 1640 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UGE; ;
- break;}
-case 49:
-#line 1641 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_TRUE; ;
- break;}
-case 50:
-#line 1642 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_FALSE; ;
- break;}
-case 80:
-#line 1673 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.StrVal = yyvsp[-1].StrVal;
- ;
- break;}
-case 81:
-#line 1676 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.StrVal = 0;
- ;
- break;}
-case 82:
-#line 1681 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::InternalLinkage; ;
- break;}
-case 83:
-#line 1682 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ;
- break;}
-case 84:
-#line 1683 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::WeakLinkage; ;
- break;}
-case 85:
-#line 1684 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::AppendingLinkage; ;
- break;}
-case 86:
-#line 1685 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::DLLImportLinkage; ;
- break;}
-case 87:
-#line 1686 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::DLLExportLinkage; ;
- break;}
-case 88:
-#line 1687 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
- break;}
-case 89:
-#line 1688 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
- break;}
-case 90:
-#line 1692 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::C; ;
- break;}
-case 91:
-#line 1693 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::C; ;
- break;}
-case 92:
-#line 1694 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::CSRet; ;
- break;}
-case 93:
-#line 1695 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::Fast; ;
- break;}
-case 94:
-#line 1696 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::Cold; ;
- break;}
-case 95:
-#line 1697 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::X86_StdCall; ;
- break;}
-case 96:
-#line 1698 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::X86_FastCall; ;
- break;}
-case 97:
-#line 1699 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val)
+ case 86:
+#line 1684 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
+ break;
+
+ case 87:
+#line 1685 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
+ break;
+
+ case 88:
+#line 1686 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
+ break;
+
+ case 89:
+#line 1687 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
+ break;
+
+ case 90:
+#line 1688 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
+ break;
+
+ case 91:
+#line 1692 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::C; ;}
+ break;
+
+ case 92:
+#line 1693 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::C; ;}
+ break;
+
+ case 93:
+#line 1694 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::CSRet; ;}
+ break;
+
+ case 94:
+#line 1695 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::Fast; ;}
+ break;
+
+ case 95:
+#line 1696 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::Cold; ;}
+ break;
+
+ case 96:
+#line 1697 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::X86_StdCall; ;}
+ break;
+
+ case 97:
+#line 1698 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::X86_FastCall; ;}
+ break;
+
+ case 98:
+#line 1699 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val))
error("Calling conv too large");
- yyval.UIntVal = yyvsp[0].UInt64Val;
- ;
- break;}
-case 98:
-#line 1709 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = 0; ;
- break;}
-case 99:
-#line 1710 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.UIntVal = yyvsp[0].UInt64Val;
- if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
+ (yyval.UIntVal) = (yyvsp[0].UInt64Val);
+ ;}
+ break;
+
+ case 99:
+#line 1709 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = 0; ;}
+ break;
+
+ case 100:
+#line 1710 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.UIntVal) = (yyvsp[0].UInt64Val);
+ if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
error("Alignment must be a power of two");
- ;
- break;}
-case 100:
-#line 1718 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = 0; ;
- break;}
-case 101:
-#line 1719 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.UIntVal = yyvsp[0].UInt64Val;
- if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
+ ;}
+ break;
+
+ case 101:
+#line 1718 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = 0; ;}
+ break;
+
+ case 102:
+#line 1719 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.UIntVal) = (yyvsp[0].UInt64Val);
+ if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
error("Alignment must be a power of two");
- ;
- break;}
-case 102:
-#line 1727 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- for (unsigned i = 0, e = strlen(yyvsp[0].StrVal); i != e; ++i)
- if (yyvsp[0].StrVal[i] == '"' || yyvsp[0].StrVal[i] == '\\')
+ ;}
+ break;
+
+ case 103:
+#line 1727 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i)
+ if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\')
error("Invalid character in section name");
- yyval.StrVal = yyvsp[0].StrVal;
- ;
- break;}
-case 103:
-#line 1736 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.StrVal = 0; ;
- break;}
-case 104:
-#line 1737 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.StrVal = yyvsp[0].StrVal; ;
- break;}
-case 105:
-#line 1744 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{;
- break;}
-case 106:
-#line 1745 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{;
- break;}
-case 107:
-#line 1749 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurGV->setSection(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 108:
-#line 1753 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].UInt64Val != 0 && !isPowerOf2_32(yyvsp[0].UInt64Val))
+ (yyval.StrVal) = (yyvsp[0].StrVal);
+ ;}
+ break;
+
+ case 104:
+#line 1736 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.StrVal) = 0; ;}
+ break;
+
+ case 105:
+#line 1737 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.StrVal) = (yyvsp[0].StrVal); ;}
+ break;
+
+ case 106:
+#line 1744 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {;}
+ break;
+
+ case 107:
+#line 1745 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {;}
+ break;
+
+ case 108:
+#line 1749 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurGV->setSection((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 109:
+#line 1753 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val)))
error("Alignment must be a power of two");
- CurGV->setAlignment(yyvsp[0].UInt64Val);
+ CurGV->setAlignment((yyvsp[0].UInt64Val));
- ;
- break;}
-case 110:
-#line 1770 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeVal.PAT = new PATypeHolder(yyvsp[0].PrimType.T);
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 112:
-#line 1778 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeVal.PAT = new PATypeHolder(yyvsp[0].PrimType.T);
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 113:
-#line 1785 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 111:
+#line 1770 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T);
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 113:
+#line 1778 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T);
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 114:
+#line 1785 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
if (!UpRefs.empty())
- error("Invalid upreference in type: " + (*yyvsp[0].TypeVal.PAT)->getDescription());
- yyval.TypeVal = yyvsp[0].TypeVal;
- ;
- break;}
-case 126:
-#line 1799 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeVal.PAT = new PATypeHolder(yyvsp[0].PrimType.T);
- yyval.TypeVal.S = yyvsp[0].PrimType.S;
- ;
- break;}
-case 127:
-#line 1803 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeVal.PAT = new PATypeHolder(OpaqueType::get());
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 128:
-#line 1807 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Named types are also simple types...
- const Type* tmp = getType(yyvsp[0].ValIDVal);
- yyval.TypeVal.PAT = new PATypeHolder(tmp);
- yyval.TypeVal.S = Signless; // FIXME: what if its signed?
- ;
- break;}
-case 129:
-#line 1812 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Type UpReference
- if (yyvsp[0].UInt64Val > (uint64_t)~0U)
+ error("Invalid upreference in type: " + (*(yyvsp[0].TypeVal).PAT)->getDescription());
+ (yyval.TypeVal) = (yyvsp[0].TypeVal);
+ ;}
+ break;
+
+ case 127:
+#line 1799 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T);
+ (yyval.TypeVal).S = (yyvsp[0].PrimType).S;
+ ;}
+ break;
+
+ case 128:
+#line 1803 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeVal).PAT = new PATypeHolder(OpaqueType::get());
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 129:
+#line 1807 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Named types are also simple types...
+ const Type* tmp = getType((yyvsp[0].ValIDVal));
+ (yyval.TypeVal).PAT = new PATypeHolder(tmp);
+ (yyval.TypeVal).S = Signless; // FIXME: what if its signed?
+ ;}
+ break;
+
+ case 130:
+#line 1812 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Type UpReference
+ if ((yyvsp[0].UInt64Val) > (uint64_t)~0U)
error("Value out of range");
OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
- UpRefs.push_back(UpRefRecord((unsigned)yyvsp[0].UInt64Val, OT)); // Add to vector...
- yyval.TypeVal.PAT = new PATypeHolder(OT);
- yyval.TypeVal.S = Signless;
+ UpRefs.push_back(UpRefRecord((unsigned)(yyvsp[0].UInt64Val), OT)); // Add to vector...
+ (yyval.TypeVal).PAT = new PATypeHolder(OT);
+ (yyval.TypeVal).S = Signless;
UR_OUT("New Upreference!\n");
- ;
- break;}
-case 130:
-#line 1821 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Function derived type?
+ ;}
+ break;
+
+ case 131:
+#line 1821 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Function derived type?
std::vector<const Type*> Params;
- for (std::list<llvm::PATypeInfo>::iterator I = yyvsp[-1].TypeList->begin(),
- E = yyvsp[-1].TypeList->end(); I != E; ++I) {
+ for (std::list<llvm::PATypeInfo>::iterator I = (yyvsp[-1].TypeList)->begin(),
+ E = (yyvsp[-1].TypeList)->end(); I != E; ++I) {
Params.push_back(I->PAT->get());
}
FunctionType::ParamAttrsList ParamAttrs;
bool isVarArg = Params.size() && Params.back() == Type::VoidTy;
if (isVarArg) Params.pop_back();
- yyval.TypeVal.PAT = new PATypeHolder(
- HandleUpRefs(FunctionType::get(yyvsp[-3].TypeVal.PAT->get(), Params, isVarArg,
+ (yyval.TypeVal).PAT = new PATypeHolder(
+ HandleUpRefs(FunctionType::get((yyvsp[-3].TypeVal).PAT->get(), Params, isVarArg,
ParamAttrs)));
- yyval.TypeVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT; // Delete the return type handle
- delete yyvsp[-1].TypeList; // Delete the argument list
- ;
- break;}
-case 131:
-#line 1838 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Sized array type?
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(ArrayType::get(yyvsp[-1].TypeVal.PAT->get(),
- (unsigned)yyvsp[-3].UInt64Val)));
- yyval.TypeVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 132:
-#line 1844 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Packed array type?
- const llvm::Type* ElemTy = yyvsp[-1].TypeVal.PAT->get();
- if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val)
+ (yyval.TypeVal).S = (yyvsp[-3].TypeVal).S;
+ delete (yyvsp[-3].TypeVal).PAT; // Delete the return type handle
+ delete (yyvsp[-1].TypeList); // Delete the argument list
+ ;}
+ break;
+
+ case 132:
+#line 1838 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Sized array type?
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(ArrayType::get((yyvsp[-1].TypeVal).PAT->get(),
+ (unsigned)(yyvsp[-3].UInt64Val))));
+ (yyval.TypeVal).S = (yyvsp[-1].TypeVal).S;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 133:
+#line 1844 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Packed array type?
+ const llvm::Type* ElemTy = (yyvsp[-1].TypeVal).PAT->get();
+ if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val))
error("Unsigned result not equal to signed result");
if (!(ElemTy->isInteger() || ElemTy->isFloatingPoint()))
- error("Elements of a PackedType must be integer or floating point");
- if (!isPowerOf2_32(yyvsp[-3].UInt64Val))
- error("PackedType length should be a power of 2");
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(PackedType::get(ElemTy,
- (unsigned)yyvsp[-3].UInt64Val)));
- yyval.TypeVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 133:
-#line 1857 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Structure type?
+ error("Elements of a VectorType must be integer or floating point");
+ if (!isPowerOf2_32((yyvsp[-3].UInt64Val)))
+ error("VectorType length should be a power of 2");
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(VectorType::get(ElemTy,
+ (unsigned)(yyvsp[-3].UInt64Val))));
+ (yyval.TypeVal).S = (yyvsp[-1].TypeVal).S;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 134:
+#line 1857 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Structure type?
std::vector<const Type*> Elements;
- for (std::list<llvm::PATypeInfo>::iterator I = yyvsp[-1].TypeList->begin(),
- E = yyvsp[-1].TypeList->end(); I != E; ++I)
+ for (std::list<llvm::PATypeInfo>::iterator I = (yyvsp[-1].TypeList)->begin(),
+ E = (yyvsp[-1].TypeList)->end(); I != E; ++I)
Elements.push_back(I->PAT->get());
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(StructType::get(Elements)));
- yyval.TypeVal.S = Signless;
- delete yyvsp[-1].TypeList;
- ;
- break;}
-case 134:
-#line 1866 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Empty structure type?
- yyval.TypeVal.PAT = new PATypeHolder(StructType::get(std::vector<const Type*>()));
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 135:
-#line 1870 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Packed Structure type?
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(StructType::get(Elements)));
+ (yyval.TypeVal).S = Signless;
+ delete (yyvsp[-1].TypeList);
+ ;}
+ break;
+
+ case 135:
+#line 1866 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Empty structure type?
+ (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector<const Type*>()));
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 136:
+#line 1870 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Packed Structure type?
std::vector<const Type*> Elements;
- for (std::list<llvm::PATypeInfo>::iterator I = yyvsp[-2].TypeList->begin(),
- E = yyvsp[-2].TypeList->end(); I != E; ++I) {
+ for (std::list<llvm::PATypeInfo>::iterator I = (yyvsp[-2].TypeList)->begin(),
+ E = (yyvsp[-2].TypeList)->end(); I != E; ++I) {
Elements.push_back(I->PAT->get());
delete I->PAT;
}
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true)));
- yyval.TypeVal.S = Signless;
- delete yyvsp[-2].TypeList;
- ;
- break;}
-case 136:
-#line 1881 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Empty packed structure type?
- yyval.TypeVal.PAT = new PATypeHolder(StructType::get(std::vector<const Type*>(),true));
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 137:
-#line 1885 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Pointer type?
- if (yyvsp[-1].TypeVal.PAT->get() == Type::LabelTy)
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true)));
+ (yyval.TypeVal).S = Signless;
+ delete (yyvsp[-2].TypeList);
+ ;}
+ break;
+
+ case 137:
+#line 1881 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Empty packed structure type?
+ (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector<const Type*>(),true));
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 138:
+#line 1885 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Pointer type?
+ if ((yyvsp[-1].TypeVal).PAT->get() == Type::LabelTy)
error("Cannot form a pointer to a basic block");
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(PointerType::get(yyvsp[-1].TypeVal.PAT->get())));
- yyval.TypeVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 138:
-#line 1898 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeList = new std::list<PATypeInfo>();
- yyval.TypeList->push_back(yyvsp[0].TypeVal);
- ;
- break;}
-case 139:
-#line 1902 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- (yyval.TypeList=yyvsp[-2].TypeList)->push_back(yyvsp[0].TypeVal);
- ;
- break;}
-case 141:
-#line 1910 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(PointerType::get((yyvsp[-1].TypeVal).PAT->get())));
+ (yyval.TypeVal).S = (yyvsp[-1].TypeVal).S;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 139:
+#line 1898 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeList) = new std::list<PATypeInfo>();
+ (yyval.TypeList)->push_back((yyvsp[0].TypeVal));
+ ;}
+ break;
+
+ case 140:
+#line 1902 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back((yyvsp[0].TypeVal));
+ ;}
+ break;
+
+ case 142:
+#line 1910 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
PATypeInfo VoidTI;
VoidTI.PAT = new PATypeHolder(Type::VoidTy);
VoidTI.S = Signless;
- (yyval.TypeList=yyvsp[-2].TypeList)->push_back(VoidTI);
- ;
- break;}
-case 142:
-#line 1916 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeList = new std::list<PATypeInfo>();
+ ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(VoidTI);
+ ;}
+ break;
+
+ case 143:
+#line 1916 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeList) = new std::list<PATypeInfo>();
PATypeInfo VoidTI;
VoidTI.PAT = new PATypeHolder(Type::VoidTy);
VoidTI.S = Signless;
- yyval.TypeList->push_back(VoidTI);
- ;
- break;}
-case 143:
-#line 1923 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeList = new std::list<PATypeInfo>();
- ;
- break;}
-case 144:
-#line 1935 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Nonempty unsized arr
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-3].TypeVal.PAT->get());
+ (yyval.TypeList)->push_back(VoidTI);
+ ;}
+ break;
+
+ case 144:
+#line 1923 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeList) = new std::list<PATypeInfo>();
+ ;}
+ break;
+
+ case 145:
+#line 1935 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Nonempty unsized arr
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-3].TypeVal).PAT->get());
if (ATy == 0)
error("Cannot make array constant with type: '" +
- yyvsp[-3].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[-3].TypeVal).PAT->get()->getDescription() + "'");
const Type *ETy = ATy->getElementType();
int NumElements = ATy->getNumElements();
// Verify that we have the correct size...
- if (NumElements != -1 && NumElements != (int)yyvsp[-1].ConstVector->size())
+ if (NumElements != -1 && NumElements != (int)(yyvsp[-1].ConstVector)->size())
error("Type mismatch: constant sized array initialized with " +
- utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " +
+ utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " +
itostr(NumElements) + "");
// Verify all elements are correct type!
std::vector<Constant*> Elems;
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- Constant *C = (*yyvsp[-1].ConstVector)[i].C;
+ for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) {
+ Constant *C = (*(yyvsp[-1].ConstVector))[i].C;
const Type* ValTy = C->getType();
if (ETy != ValTy)
error("Element #" + utostr(i) + " is not of type '" +
@@ -3518,72 +4243,75 @@ case 144:
ValTy->getDescription() + "'");
Elems.push_back(C);
}
- yyval.ConstVal.C = ConstantArray::get(ATy, Elems);
- yyval.ConstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- delete yyvsp[-1].ConstVector;
- ;
- break;}
-case 145:
-#line 1965 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-2].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantArray::get(ATy, Elems);
+ (yyval.ConstVal).S = (yyvsp[-3].TypeVal).S;
+ delete (yyvsp[-3].TypeVal).PAT;
+ delete (yyvsp[-1].ConstVector);
+ ;}
+ break;
+
+ case 146:
+#line 1965 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-2].TypeVal).PAT->get());
if (ATy == 0)
error("Cannot make array constant with type: '" +
- yyvsp[-2].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[-2].TypeVal).PAT->get()->getDescription() + "'");
int NumElements = ATy->getNumElements();
if (NumElements != -1 && NumElements != 0)
error("Type mismatch: constant sized array initialized with 0"
" arguments, but has size of " + itostr(NumElements) +"");
- yyval.ConstVal.C = ConstantArray::get(ATy, std::vector<Constant*>());
- yyval.ConstVal.S = yyvsp[-2].TypeVal.S;
- delete yyvsp[-2].TypeVal.PAT;
- ;
- break;}
-case 146:
-#line 1978 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-2].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantArray::get(ATy, std::vector<Constant*>());
+ (yyval.ConstVal).S = (yyvsp[-2].TypeVal).S;
+ delete (yyvsp[-2].TypeVal).PAT;
+ ;}
+ break;
+
+ case 147:
+#line 1978 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-2].TypeVal).PAT->get());
if (ATy == 0)
error("Cannot make array constant with type: '" +
- yyvsp[-2].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[-2].TypeVal).PAT->get()->getDescription() + "'");
int NumElements = ATy->getNumElements();
const Type *ETy = dyn_cast<IntegerType>(ATy->getElementType());
if (!ETy || cast<IntegerType>(ETy)->getBitWidth() != 8)
error("String arrays require type i8, not '" + ETy->getDescription() +
"'");
- char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true);
- if (NumElements != -1 && NumElements != (EndStr-yyvsp[0].StrVal))
+ char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true);
+ if (NumElements != -1 && NumElements != (EndStr-(yyvsp[0].StrVal)))
error("Can't build string constant of size " +
- itostr((int)(EndStr-yyvsp[0].StrVal)) + " when array has size " +
+ itostr((int)(EndStr-(yyvsp[0].StrVal))) + " when array has size " +
itostr(NumElements) + "");
std::vector<Constant*> Vals;
- for (char *C = (char *)yyvsp[0].StrVal; C != (char *)EndStr; ++C)
+ for (char *C = (char *)(yyvsp[0].StrVal); C != (char *)EndStr; ++C)
Vals.push_back(ConstantInt::get(ETy, *C));
- free(yyvsp[0].StrVal);
- yyval.ConstVal.C = ConstantArray::get(ATy, Vals);
- yyval.ConstVal.S = yyvsp[-2].TypeVal.S;
- delete yyvsp[-2].TypeVal.PAT;
- ;
- break;}
-case 147:
-#line 2001 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Nonempty unsized arr
- const PackedType *PTy = dyn_cast<PackedType>(yyvsp[-3].TypeVal.PAT->get());
+ free((yyvsp[0].StrVal));
+ (yyval.ConstVal).C = ConstantArray::get(ATy, Vals);
+ (yyval.ConstVal).S = (yyvsp[-2].TypeVal).S;
+ delete (yyvsp[-2].TypeVal).PAT;
+ ;}
+ break;
+
+ case 148:
+#line 2001 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Nonempty unsized arr
+ const VectorType *PTy = dyn_cast<VectorType>((yyvsp[-3].TypeVal).PAT->get());
if (PTy == 0)
error("Cannot make packed constant with type: '" +
- yyvsp[-3].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[-3].TypeVal).PAT->get()->getDescription() + "'");
const Type *ETy = PTy->getElementType();
int NumElements = PTy->getNumElements();
// Verify that we have the correct size...
- if (NumElements != -1 && NumElements != (int)yyvsp[-1].ConstVector->size())
+ if (NumElements != -1 && NumElements != (int)(yyvsp[-1].ConstVector)->size())
error("Type mismatch: constant sized packed initialized with " +
- utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " +
+ utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " +
itostr(NumElements) + "");
// Verify all elements are correct type!
std::vector<Constant*> Elems;
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- Constant *C = (*yyvsp[-1].ConstVector)[i].C;
+ for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) {
+ Constant *C = (*(yyvsp[-1].ConstVector))[i].C;
const Type* ValTy = C->getType();
if (ETy != ValTy)
error("Element #" + utostr(i) + " is not of type '" +
@@ -3591,117 +4319,124 @@ case 147:
ValTy->getDescription() + "'");
Elems.push_back(C);
}
- yyval.ConstVal.C = ConstantPacked::get(PTy, Elems);
- yyval.ConstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- delete yyvsp[-1].ConstVector;
- ;
- break;}
-case 148:
-#line 2029 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-3].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantVector::get(PTy, Elems);
+ (yyval.ConstVal).S = (yyvsp[-3].TypeVal).S;
+ delete (yyvsp[-3].TypeVal).PAT;
+ delete (yyvsp[-1].ConstVector);
+ ;}
+ break;
+
+ case 149:
+#line 2029 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[-3].TypeVal).PAT->get());
if (STy == 0)
error("Cannot make struct constant with type: '" +
- yyvsp[-3].TypeVal.PAT->get()->getDescription() + "'");
- if (yyvsp[-1].ConstVector->size() != STy->getNumContainedTypes())
+ (yyvsp[-3].TypeVal).PAT->get()->getDescription() + "'");
+ if ((yyvsp[-1].ConstVector)->size() != STy->getNumContainedTypes())
error("Illegal number of initializers for structure type");
// Check to ensure that constants are compatible with the type initializer!
std::vector<Constant*> Fields;
- for (unsigned i = 0, e = yyvsp[-1].ConstVector->size(); i != e; ++i) {
- Constant *C = (*yyvsp[-1].ConstVector)[i].C;
+ for (unsigned i = 0, e = (yyvsp[-1].ConstVector)->size(); i != e; ++i) {
+ Constant *C = (*(yyvsp[-1].ConstVector))[i].C;
if (C->getType() != STy->getElementType(i))
error("Expected type '" + STy->getElementType(i)->getDescription() +
"' for element #" + utostr(i) + " of structure initializer");
Fields.push_back(C);
}
- yyval.ConstVal.C = ConstantStruct::get(STy, Fields);
- yyval.ConstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- delete yyvsp[-1].ConstVector;
- ;
- break;}
-case 149:
-#line 2051 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-2].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantStruct::get(STy, Fields);
+ (yyval.ConstVal).S = (yyvsp[-3].TypeVal).S;
+ delete (yyvsp[-3].TypeVal).PAT;
+ delete (yyvsp[-1].ConstVector);
+ ;}
+ break;
+
+ case 150:
+#line 2051 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[-2].TypeVal).PAT->get());
if (STy == 0)
error("Cannot make struct constant with type: '" +
- yyvsp[-2].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[-2].TypeVal).PAT->get()->getDescription() + "'");
if (STy->getNumContainedTypes() != 0)
error("Illegal number of initializers for structure type");
- yyval.ConstVal.C = ConstantStruct::get(STy, std::vector<Constant*>());
- yyval.ConstVal.S = yyvsp[-2].TypeVal.S;
- delete yyvsp[-2].TypeVal.PAT;
- ;
- break;}
-case 150:
-#line 2062 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-5].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantStruct::get(STy, std::vector<Constant*>());
+ (yyval.ConstVal).S = (yyvsp[-2].TypeVal).S;
+ delete (yyvsp[-2].TypeVal).PAT;
+ ;}
+ break;
+
+ case 151:
+#line 2062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[-5].TypeVal).PAT->get());
if (STy == 0)
error("Cannot make packed struct constant with type: '" +
- yyvsp[-5].TypeVal.PAT->get()->getDescription() + "'");
- if (yyvsp[-2].ConstVector->size() != STy->getNumContainedTypes())
+ (yyvsp[-5].TypeVal).PAT->get()->getDescription() + "'");
+ if ((yyvsp[-2].ConstVector)->size() != STy->getNumContainedTypes())
error("Illegal number of initializers for packed structure type");
// Check to ensure that constants are compatible with the type initializer!
std::vector<Constant*> Fields;
- for (unsigned i = 0, e = yyvsp[-2].ConstVector->size(); i != e; ++i) {
- Constant *C = (*yyvsp[-2].ConstVector)[i].C;
+ for (unsigned i = 0, e = (yyvsp[-2].ConstVector)->size(); i != e; ++i) {
+ Constant *C = (*(yyvsp[-2].ConstVector))[i].C;
if (C->getType() != STy->getElementType(i))
error("Expected type '" + STy->getElementType(i)->getDescription() +
"' for element #" + utostr(i) + " of packed struct initializer");
Fields.push_back(C);
}
- yyval.ConstVal.C = ConstantStruct::get(STy, Fields);
- yyval.ConstVal.S = yyvsp[-5].TypeVal.S;
- delete yyvsp[-5].TypeVal.PAT;
- delete yyvsp[-2].ConstVector;
- ;
- break;}
-case 151:
-#line 2084 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-4].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantStruct::get(STy, Fields);
+ (yyval.ConstVal).S = (yyvsp[-5].TypeVal).S;
+ delete (yyvsp[-5].TypeVal).PAT;
+ delete (yyvsp[-2].ConstVector);
+ ;}
+ break;
+
+ case 152:
+#line 2084 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[-4].TypeVal).PAT->get());
if (STy == 0)
error("Cannot make packed struct constant with type: '" +
- yyvsp[-4].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[-4].TypeVal).PAT->get()->getDescription() + "'");
if (STy->getNumContainedTypes() != 0)
error("Illegal number of initializers for packed structure type");
- yyval.ConstVal.C = ConstantStruct::get(STy, std::vector<Constant*>());
- yyval.ConstVal.S = yyvsp[-4].TypeVal.S;
- delete yyvsp[-4].TypeVal.PAT;
- ;
- break;}
-case 152:
-#line 2095 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const PointerType *PTy = dyn_cast<PointerType>(yyvsp[-1].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantStruct::get(STy, std::vector<Constant*>());
+ (yyval.ConstVal).S = (yyvsp[-4].TypeVal).S;
+ delete (yyvsp[-4].TypeVal).PAT;
+ ;}
+ break;
+
+ case 153:
+#line 2095 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const PointerType *PTy = dyn_cast<PointerType>((yyvsp[-1].TypeVal).PAT->get());
if (PTy == 0)
error("Cannot make null pointer constant with type: '" +
- yyvsp[-1].TypeVal.PAT->get()->getDescription() + "'");
- yyval.ConstVal.C = ConstantPointerNull::get(PTy);
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 153:
-#line 2104 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ConstVal.C = UndefValue::get(yyvsp[-1].TypeVal.PAT->get());
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 154:
-#line 2109 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const PointerType *Ty = dyn_cast<PointerType>(yyvsp[-1].TypeVal.PAT->get());
+ (yyvsp[-1].TypeVal).PAT->get()->getDescription() + "'");
+ (yyval.ConstVal).C = ConstantPointerNull::get(PTy);
+ (yyval.ConstVal).S = (yyvsp[-1].TypeVal).S;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 154:
+#line 2104 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ConstVal).C = UndefValue::get((yyvsp[-1].TypeVal).PAT->get());
+ (yyval.ConstVal).S = (yyvsp[-1].TypeVal).S;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 155:
+#line 2109 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const PointerType *Ty = dyn_cast<PointerType>((yyvsp[-1].TypeVal).PAT->get());
if (Ty == 0)
error("Global const reference must be a pointer type, not" +
- yyvsp[-1].TypeVal.PAT->get()->getDescription());
+ (yyvsp[-1].TypeVal).PAT->get()->getDescription());
// ConstExprs can exist in the body of a function, thus creating
// GlobalValues whenever they refer to a variable. Because we are in
@@ -3712,7 +4447,7 @@ case 154:
//
Function *SavedCurFn = CurFun.CurrentFunction;
CurFun.CurrentFunction = 0;
- Value *V = getExistingValue(Ty, yyvsp[0].ValIDVal);
+ Value *V = getExistingValue(Ty, (yyvsp[0].ValIDVal));
CurFun.CurrentFunction = SavedCurFn;
// If this is an initializer for a constant pointer, which is referencing a
@@ -3725,14 +4460,14 @@ case 154:
// First check to see if the forward references value is already created!
PerModuleInfo::GlobalRefsType::iterator I =
- CurModule.GlobalRefs.find(std::make_pair(PT, yyvsp[0].ValIDVal));
+ CurModule.GlobalRefs.find(std::make_pair(PT, (yyvsp[0].ValIDVal)));
if (I != CurModule.GlobalRefs.end()) {
V = I->second; // Placeholder already exists, use it...
- yyvsp[0].ValIDVal.destroy();
+ (yyvsp[0].ValIDVal).destroy();
} else {
std::string Name;
- if (yyvsp[0].ValIDVal.Type == ValID::NameVal) Name = yyvsp[0].ValIDVal.Name;
+ if ((yyvsp[0].ValIDVal).Type == ValID::NameVal) Name = (yyvsp[0].ValIDVal).Name;
// Create the forward referenced global.
GlobalValue *GV;
@@ -3747,141 +4482,152 @@ case 154:
}
// Keep track of the fact that we have a forward ref to recycle it
- CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, yyvsp[0].ValIDVal), GV));
+ CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, (yyvsp[0].ValIDVal)), GV));
V = GV;
}
}
- yyval.ConstVal.C = cast<GlobalValue>(V);
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT; // Free the type handle
- ;
- break;}
-case 155:
-#line 2167 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[-1].TypeVal.PAT->get() != yyvsp[0].ConstVal.C->getType())
+ (yyval.ConstVal).C = cast<GlobalValue>(V);
+ (yyval.ConstVal).S = (yyvsp[-1].TypeVal).S;
+ delete (yyvsp[-1].TypeVal).PAT; // Free the type handle
+ ;}
+ break;
+
+ case 156:
+#line 2167 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[-1].TypeVal).PAT->get() != (yyvsp[0].ConstVal).C->getType())
error("Mismatched types for constant expression");
- yyval.ConstVal = yyvsp[0].ConstVal;
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 156:
-#line 2174 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-1].TypeVal.PAT->get();
+ (yyval.ConstVal) = (yyvsp[0].ConstVal);
+ (yyval.ConstVal).S = (yyvsp[-1].TypeVal).S;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 157:
+#line 2174 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-1].TypeVal).PAT->get();
if (isa<FunctionType>(Ty) || Ty == Type::LabelTy || isa<OpaqueType>(Ty))
error("Cannot create a null initialized value of this type");
- yyval.ConstVal.C = Constant::getNullValue(Ty);
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 157:
-#line 2182 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // integral constants
- const Type *Ty = yyvsp[-1].PrimType.T;
- if (!ConstantInt::isValueValidForType(Ty, yyvsp[0].SInt64Val))
+ (yyval.ConstVal).C = Constant::getNullValue(Ty);
+ (yyval.ConstVal).S = (yyvsp[-1].TypeVal).S;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 158:
+#line 2182 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // integral constants
+ const Type *Ty = (yyvsp[-1].PrimType).T;
+ if (!ConstantInt::isValueValidForType(Ty, (yyvsp[0].SInt64Val)))
error("Constant value doesn't fit in type");
- yyval.ConstVal.C = ConstantInt::get(Ty, yyvsp[0].SInt64Val);
- yyval.ConstVal.S = Signed;
- ;
- break;}
-case 158:
-#line 2189 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // integral constants
- const Type *Ty = yyvsp[-1].PrimType.T;
- if (!ConstantInt::isValueValidForType(Ty, yyvsp[0].UInt64Val))
+ (yyval.ConstVal).C = ConstantInt::get(Ty, (yyvsp[0].SInt64Val));
+ (yyval.ConstVal).S = Signed;
+ ;}
+ break;
+
+ case 159:
+#line 2189 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // integral constants
+ const Type *Ty = (yyvsp[-1].PrimType).T;
+ if (!ConstantInt::isValueValidForType(Ty, (yyvsp[0].UInt64Val)))
error("Constant value doesn't fit in type");
- yyval.ConstVal.C = ConstantInt::get(Ty, yyvsp[0].UInt64Val);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 159:
-#line 2196 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Boolean constants
- yyval.ConstVal.C = ConstantInt::get(Type::Int1Ty, true);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 160:
-#line 2200 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Boolean constants
- yyval.ConstVal.C = ConstantInt::get(Type::Int1Ty, false);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 161:
-#line 2204 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Float & Double constants
- if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType.T, yyvsp[0].FPVal))
+ (yyval.ConstVal).C = ConstantInt::get(Ty, (yyvsp[0].UInt64Val));
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 160:
+#line 2196 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Boolean constants
+ (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, true);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 161:
+#line 2200 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Boolean constants
+ (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, false);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 162:
+#line 2204 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Float & Double constants
+ if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType).T, (yyvsp[0].FPVal)))
error("Floating point constant invalid for type");
- yyval.ConstVal.C = ConstantFP::get(yyvsp[-1].PrimType.T, yyvsp[0].FPVal);
- yyval.ConstVal.S = Signless;
- ;
- break;}
-case 162:
-#line 2213 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* SrcTy = yyvsp[-3].ConstVal.C->getType();
- const Type* DstTy = yyvsp[-1].TypeVal.PAT->get();
- Signedness SrcSign = yyvsp[-3].ConstVal.S;
- Signedness DstSign = yyvsp[-1].TypeVal.S;
+ (yyval.ConstVal).C = ConstantFP::get((yyvsp[-1].PrimType).T, (yyvsp[0].FPVal));
+ (yyval.ConstVal).S = Signless;
+ ;}
+ break;
+
+ case 163:
+#line 2213 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* SrcTy = (yyvsp[-3].ConstVal).C->getType();
+ const Type* DstTy = (yyvsp[-1].TypeVal).PAT->get();
+ Signedness SrcSign = (yyvsp[-3].ConstVal).S;
+ Signedness DstSign = (yyvsp[-1].TypeVal).S;
if (!SrcTy->isFirstClassType())
error("cast constant expression from a non-primitive type: '" +
SrcTy->getDescription() + "'");
if (!DstTy->isFirstClassType())
error("cast constant expression to a non-primitive type: '" +
DstTy->getDescription() + "'");
- yyval.ConstVal.C = cast<Constant>(getCast(yyvsp[-5].CastOpVal, yyvsp[-3].ConstVal.C, SrcSign, DstTy, DstSign));
- yyval.ConstVal.S = DstSign;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 163:
-#line 2228 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-2].ConstVal.C->getType();
+ (yyval.ConstVal).C = cast<Constant>(getCast((yyvsp[-5].CastOpVal), (yyvsp[-3].ConstVal).C, SrcSign, DstTy, DstSign));
+ (yyval.ConstVal).S = DstSign;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 164:
+#line 2228 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-2].ConstVal).C->getType();
if (!isa<PointerType>(Ty))
error("GetElementPtr requires a pointer operand");
std::vector<Value*> VIndices;
std::vector<Constant*> CIndices;
- upgradeGEPIndices(yyvsp[-2].ConstVal.C->getType(), yyvsp[-1].ValueList, VIndices, &CIndices);
-
- delete yyvsp[-1].ValueList;
- yyval.ConstVal.C = ConstantExpr::getGetElementPtr(yyvsp[-2].ConstVal.C, CIndices);
- yyval.ConstVal.S = Signless;
- ;
- break;}
-case 164:
-#line 2241 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!yyvsp[-5].ConstVal.C->getType()->isInteger() ||
- cast<IntegerType>(yyvsp[-5].ConstVal.C->getType())->getBitWidth() != 1)
+ upgradeGEPIndices((yyvsp[-2].ConstVal).C->getType(), (yyvsp[-1].ValueList), VIndices, &CIndices);
+
+ delete (yyvsp[-1].ValueList);
+ (yyval.ConstVal).C = ConstantExpr::getGetElementPtr((yyvsp[-2].ConstVal).C, CIndices);
+ (yyval.ConstVal).S = Signless;
+ ;}
+ break;
+
+ case 165:
+#line 2241 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!(yyvsp[-5].ConstVal).C->getType()->isInteger() ||
+ cast<IntegerType>((yyvsp[-5].ConstVal).C->getType())->getBitWidth() != 1)
error("Select condition must be bool type");
- if (yyvsp[-3].ConstVal.C->getType() != yyvsp[-1].ConstVal.C->getType())
+ if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType())
error("Select operand types must match");
- yyval.ConstVal.C = ConstantExpr::getSelect(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 165:
-#line 2250 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-3].ConstVal.C->getType();
- if (Ty != yyvsp[-1].ConstVal.C->getType())
+ (yyval.ConstVal).C = ConstantExpr::getSelect((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 166:
+#line 2250 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-3].ConstVal).C->getType();
+ if (Ty != (yyvsp[-1].ConstVal).C->getType())
error("Binary operator types must match");
// First, make sure we're dealing with the right opcode by upgrading from
// obsolete versions.
- Instruction::BinaryOps Opcode = getBinaryOp(yyvsp[-5].BinaryOpVal, Ty, yyvsp[-3].ConstVal.S);
+ Instruction::BinaryOps Opcode = getBinaryOp((yyvsp[-5].BinaryOpVal), Ty, (yyvsp[-3].ConstVal).S);
// HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs.
// To retain backward compatibility with these early compilers, we emit a
// cast to the appropriate integer type automatically if we are in the
// broken case. See PR424 for more information.
if (!isa<PointerType>(Ty)) {
- yyval.ConstVal.C = ConstantExpr::get(Opcode, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
+ (yyval.ConstVal).C = ConstantExpr::get(Opcode, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
} else {
const Type *IntPtrTy = 0;
switch (CurModule.CurrentModule->getPointerSize()) {
@@ -3889,147 +4635,165 @@ case 165:
case Module::Pointer64: IntPtrTy = Type::Int64Ty; break;
default: error("invalid pointer binary constant expr");
}
- yyval.ConstVal.C = ConstantExpr::get(Opcode,
- ConstantExpr::getCast(Instruction::PtrToInt, yyvsp[-3].ConstVal.C, IntPtrTy),
- ConstantExpr::getCast(Instruction::PtrToInt, yyvsp[-1].ConstVal.C, IntPtrTy));
- yyval.ConstVal.C = ConstantExpr::getCast(Instruction::IntToPtr, yyval.ConstVal.C, Ty);
+ (yyval.ConstVal).C = ConstantExpr::get(Opcode,
+ ConstantExpr::getCast(Instruction::PtrToInt, (yyvsp[-3].ConstVal).C, IntPtrTy),
+ ConstantExpr::getCast(Instruction::PtrToInt, (yyvsp[-1].ConstVal).C, IntPtrTy));
+ (yyval.ConstVal).C = ConstantExpr::getCast(Instruction::IntToPtr, (yyval.ConstVal).C, Ty);
}
- yyval.ConstVal.S = yyvsp[-3].ConstVal.S;
- ;
- break;}
-case 166:
-#line 2278 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-3].ConstVal.C->getType();
- if (Ty != yyvsp[-1].ConstVal.C->getType())
+ (yyval.ConstVal).S = (yyvsp[-3].ConstVal).S;
+ ;}
+ break;
+
+ case 167:
+#line 2278 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[-3].ConstVal).C->getType();
+ if (Ty != (yyvsp[-1].ConstVal).C->getType())
error("Logical operator types must match");
if (!Ty->isInteger()) {
- if (!isa<PackedType>(Ty) ||
- !cast<PackedType>(Ty)->getElementType()->isInteger())
+ if (!isa<VectorType>(Ty) ||
+ !cast<VectorType>(Ty)->getElementType()->isInteger())
error("Logical operator requires integer operands");
}
- Instruction::BinaryOps Opcode = getBinaryOp(yyvsp[-5].BinaryOpVal, Ty, yyvsp[-3].ConstVal.S);
- yyval.ConstVal.C = ConstantExpr::get(Opcode, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = yyvsp[-3].ConstVal.S;
- ;
- break;}
-case 167:
-#line 2291 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-3].ConstVal.C->getType();
- if (Ty != yyvsp[-1].ConstVal.C->getType())
+ Instruction::BinaryOps Opcode = getBinaryOp((yyvsp[-5].BinaryOpVal), Ty, (yyvsp[-3].ConstVal).S);
+ (yyval.ConstVal).C = ConstantExpr::get(Opcode, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
+ (yyval.ConstVal).S = (yyvsp[-3].ConstVal).S;
+ ;}
+ break;
+
+ case 168:
+#line 2291 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[-3].ConstVal).C->getType();
+ if (Ty != (yyvsp[-1].ConstVal).C->getType())
error("setcc operand types must match");
unsigned short pred;
- Instruction::OtherOps Opcode = getCompareOp(yyvsp[-5].BinaryOpVal, pred, Ty, yyvsp[-3].ConstVal.S);
- yyval.ConstVal.C = ConstantExpr::getCompare(Opcode, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 168:
-#line 2300 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[-3].ConstVal.C->getType() != yyvsp[-1].ConstVal.C->getType())
+ Instruction::OtherOps Opcode = getCompareOp((yyvsp[-5].BinaryOpVal), pred, Ty, (yyvsp[-3].ConstVal).S);
+ (yyval.ConstVal).C = ConstantExpr::getCompare(Opcode, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 169:
+#line 2300 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType())
error("icmp operand types must match");
- yyval.ConstVal.C = ConstantExpr::getCompare(yyvsp[-5].IPred, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 169:
-#line 2306 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[-3].ConstVal.C->getType() != yyvsp[-1].ConstVal.C->getType())
+ (yyval.ConstVal).C = ConstantExpr::getCompare((yyvsp[-5].IPred), (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 170:
+#line 2306 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType())
error("fcmp operand types must match");
- yyval.ConstVal.C = ConstantExpr::getCompare(yyvsp[-5].FPred, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 170:
-#line 2312 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!yyvsp[-1].ConstVal.C->getType()->isInteger() ||
- cast<IntegerType>(yyvsp[-1].ConstVal.C->getType())->getBitWidth() != 8)
+ (yyval.ConstVal).C = ConstantExpr::getCompare((yyvsp[-5].FPred), (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 171:
+#line 2312 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!(yyvsp[-1].ConstVal).C->getType()->isInteger() ||
+ cast<IntegerType>((yyvsp[-1].ConstVal).C->getType())->getBitWidth() != 8)
error("Shift count for shift constant must be unsigned byte");
- const Type* Ty = yyvsp[-3].ConstVal.C->getType();
- if (!yyvsp[-3].ConstVal.C->getType()->isInteger())
+ const Type* Ty = (yyvsp[-3].ConstVal).C->getType();
+ if (!(yyvsp[-3].ConstVal).C->getType()->isInteger())
error("Shift constant expression requires integer operand");
- Constant *ShiftAmt = ConstantExpr::getZExt(yyvsp[-1].ConstVal.C, Ty);
- yyval.ConstVal.C = ConstantExpr::get(getBinaryOp(yyvsp[-5].BinaryOpVal, Ty, yyvsp[-3].ConstVal.S), yyvsp[-3].ConstVal.C, ShiftAmt);
- yyval.ConstVal.S = yyvsp[-3].ConstVal.S;
- ;
- break;}
-case 171:
-#line 2323 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!ExtractElementInst::isValidOperands(yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C))
+ Constant *ShiftAmt = ConstantExpr::getZExt((yyvsp[-1].ConstVal).C, Ty);
+ (yyval.ConstVal).C = ConstantExpr::get(getBinaryOp((yyvsp[-5].BinaryOpVal), Ty, (yyvsp[-3].ConstVal).S), (yyvsp[-3].ConstVal).C, ShiftAmt);
+ (yyval.ConstVal).S = (yyvsp[-3].ConstVal).S;
+ ;}
+ break;
+
+ case 172:
+#line 2323 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C))
error("Invalid extractelement operands");
- yyval.ConstVal.C = ConstantExpr::getExtractElement(yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = yyvsp[-3].ConstVal.S;
- ;
- break;}
-case 172:
-#line 2329 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!InsertElementInst::isValidOperands(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C))
+ (yyval.ConstVal).C = ConstantExpr::getExtractElement((yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
+ (yyval.ConstVal).S = (yyvsp[-3].ConstVal).S;
+ ;}
+ break;
+
+ case 173:
+#line 2329 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C))
error("Invalid insertelement operands");
- yyval.ConstVal.C = ConstantExpr::getInsertElement(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = yyvsp[-5].ConstVal.S;
- ;
- break;}
-case 173:
-#line 2335 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!ShuffleVectorInst::isValidOperands(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C))
+ (yyval.ConstVal).C = ConstantExpr::getInsertElement((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
+ (yyval.ConstVal).S = (yyvsp[-5].ConstVal).S;
+ ;}
+ break;
+
+ case 174:
+#line 2335 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C))
error("Invalid shufflevector operands");
- yyval.ConstVal.C = ConstantExpr::getShuffleVector(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = yyvsp[-5].ConstVal.S;
- ;
- break;}
-case 174:
-#line 2346 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); ;
- break;}
-case 175:
-#line 2347 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ConstVector = new std::vector<ConstInfo>();
- yyval.ConstVector->push_back(yyvsp[0].ConstVal);
- ;
- break;}
-case 176:
-#line 2356 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = false; ;
- break;}
-case 177:
-#line 2357 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = true; ;
- break;}
-case 178:
-#line 2369 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal;
+ (yyval.ConstVal).C = ConstantExpr::getShuffleVector((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C);
+ (yyval.ConstVal).S = (yyvsp[-5].ConstVal).S;
+ ;}
+ break;
+
+ case 175:
+#line 2346 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); ;}
+ break;
+
+ case 176:
+#line 2347 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ConstVector) = new std::vector<ConstInfo>();
+ (yyval.ConstVector)->push_back((yyvsp[0].ConstVal));
+ ;}
+ break;
+
+ case 177:
+#line 2356 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = false; ;}
+ break;
+
+ case 178:
+#line 2357 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = true; ;}
+ break;
+
+ case 179:
+#line 2369 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal);
CurModule.ModuleDone();
- ;
- break;}
-case 179:
-#line 2378 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ModuleVal = yyvsp[-1].ModuleVal; CurFun.FunctionDone(); ;
- break;}
-case 180:
-#line 2379 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ModuleVal = yyvsp[-1].ModuleVal; ;
- break;}
-case 181:
-#line 2380 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ModuleVal = yyvsp[-3].ModuleVal; ;
- break;}
-case 182:
-#line 2381 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ModuleVal = yyvsp[-1].ModuleVal; ;
- break;}
-case 183:
-#line 2382 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ModuleVal = CurModule.CurrentModule;
+ ;}
+ break;
+
+ case 180:
+#line 2378 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); ;}
+ break;
+
+ case 181:
+#line 2379 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;}
+ break;
+
+ case 182:
+#line 2380 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); ;}
+ break;
+
+ case 183:
+#line 2381 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;}
+ break;
+
+ case 184:
+#line 2382 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ModuleVal) = CurModule.CurrentModule;
// Emit an error if there are any unresolved types left.
if (!CurModule.LateResolveTypes.empty()) {
const ValID &DID = CurModule.LateResolveTypes.begin()->first;
@@ -4039,11 +4803,12 @@ case 183:
error("Reference to an undefined type: #" + itostr(DID.Num));
}
}
- ;
- break;}
-case 184:
-#line 2398 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 185:
+#line 2398 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
// Eagerly resolve types. This is not an optimization, this is a
// requirement that is due to the fact that we could have this:
//
@@ -4053,234 +4818,266 @@ case 184:
// If types are not resolved eagerly, then the two types will not be
// determined to be the same type!
//
- const Type* Ty = yyvsp[0].TypeVal.PAT->get();
- ResolveTypeTo(yyvsp[-2].StrVal, Ty);
+ const Type* Ty = (yyvsp[0].TypeVal).PAT->get();
+ ResolveTypeTo((yyvsp[-2].StrVal), Ty);
- if (!setTypeName(Ty, yyvsp[-2].StrVal) && !yyvsp[-2].StrVal) {
+ if (!setTypeName(Ty, (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) {
// If this is a named type that is not a redefinition, add it to the slot
// table.
CurModule.Types.push_back(Ty);
}
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 185:
-#line 2418 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Function prototypes can be in const pool
- ;
- break;}
-case 186:
-#line 2420 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Asm blocks can be in the const pool
- ;
- break;}
-case 187:
-#line 2422 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].ConstVal.C == 0)
+ delete (yyvsp[0].TypeVal).PAT;
+ ;}
+ break;
+
+ case 186:
+#line 2418 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Function prototypes can be in const pool
+ ;}
+ break;
+
+ case 187:
+#line 2420 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Asm blocks can be in the const pool
+ ;}
+ break;
+
+ case 188:
+#line 2422 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[0].ConstVal).C == 0)
error("Global value initializer is not a constant");
- CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, yyvsp[-2].Linkage, yyvsp[-1].BoolVal, yyvsp[0].ConstVal.C->getType(), yyvsp[0].ConstVal.C);
- ;
- break;}
-case 188:
-#line 2426 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), (yyvsp[-2].Linkage), (yyvsp[-1].BoolVal), (yyvsp[0].ConstVal).C->getType(), (yyvsp[0].ConstVal).C);
+ ;}
+ break;
+
+ case 189:
+#line 2426 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 189:
-#line 2429 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].TypeVal.PAT->get();
- CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, Ty, 0);
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 190:
-#line 2433 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 190:
+#line 2429 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[0].TypeVal).PAT->get();
+ CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), Ty, 0);
+ delete (yyvsp[0].TypeVal).PAT;
+ ;}
+ break;
+
+ case 191:
+#line 2433 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 191:
-#line 2436 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].TypeVal.PAT->get();
- CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::DLLImportLinkage, yyvsp[-1].BoolVal, Ty, 0);
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 192:
-#line 2440 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 192:
+#line 2436 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[0].TypeVal).PAT->get();
+ CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), Ty, 0);
+ delete (yyvsp[0].TypeVal).PAT;
+ ;}
+ break;
+
+ case 193:
+#line 2440 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 193:
-#line 2443 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].TypeVal.PAT->get();
+ ;}
+ break;
+
+ case 194:
+#line 2443 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[0].TypeVal).PAT->get();
CurGV =
- ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalWeakLinkage, yyvsp[-1].BoolVal, Ty, 0);
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 194:
-#line 2448 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[-1].BoolVal), Ty, 0);
+ delete (yyvsp[0].TypeVal).PAT;
+ ;}
+ break;
+
+ case 195:
+#line 2448 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 195:
-#line 2451 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- ;
- break;}
-case 196:
-#line 2453 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- ;
- break;}
-case 197:
-#line 2455 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- ;
- break;}
-case 198:
-#line 2460 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 196:
+#line 2451 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ ;}
+ break;
+
+ case 197:
+#line 2453 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ ;}
+ break;
+
+ case 198:
+#line 2455 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ ;}
+ break;
+
+ case 199:
+#line 2460 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
- char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true);
- std::string NewAsm(yyvsp[0].StrVal, EndStr);
- free(yyvsp[0].StrVal);
+ char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true);
+ std::string NewAsm((yyvsp[0].StrVal), EndStr);
+ free((yyvsp[0].StrVal));
if (AsmSoFar.empty())
CurModule.CurrentModule->setModuleInlineAsm(NewAsm);
else
CurModule.CurrentModule->setModuleInlineAsm(AsmSoFar+"\n"+NewAsm);
- ;
- break;}
-case 199:
-#line 2474 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Endianness = Module::BigEndian; ;
- break;}
-case 200:
-#line 2475 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Endianness = Module::LittleEndian; ;
- break;}
-case 201:
-#line 2479 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.setEndianness(yyvsp[0].Endianness);
- ;
- break;}
-case 202:
-#line 2482 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].UInt64Val == 32)
+ ;}
+ break;
+
+ case 200:
+#line 2474 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Endianness) = Module::BigEndian; ;}
+ break;
+
+ case 201:
+#line 2475 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Endianness) = Module::LittleEndian; ;}
+ break;
+
+ case 202:
+#line 2479 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.setEndianness((yyvsp[0].Endianness));
+ ;}
+ break;
+
+ case 203:
+#line 2482 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[0].UInt64Val) == 32)
CurModule.setPointerSize(Module::Pointer32);
- else if (yyvsp[0].UInt64Val == 64)
+ else if ((yyvsp[0].UInt64Val) == 64)
CurModule.setPointerSize(Module::Pointer64);
else
- error("Invalid pointer size: '" + utostr(yyvsp[0].UInt64Val) + "'");
- ;
- break;}
-case 203:
-#line 2490 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 204:
-#line 2494 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.CurrentModule->setDataLayout(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 206:
-#line 2505 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 207:
-#line 2509 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 208:
-#line 2513 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ ;
- break;}
-case 212:
-#line 2526 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.StrVal = 0; ;
- break;}
-case 213:
-#line 2530 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[-1].TypeVal.PAT->get() == Type::VoidTy)
+ error("Invalid pointer size: '" + utostr((yyvsp[0].UInt64Val)) + "'");
+ ;}
+ break;
+
+ case 204:
+#line 2490 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 205:
+#line 2494 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 207:
+#line 2505 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 208:
+#line 2509 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
+ free((yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 209:
+#line 2513 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { ;}
+ break;
+
+ case 213:
+#line 2526 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.StrVal) = 0; ;}
+ break;
+
+ case 214:
+#line 2530 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[-1].TypeVal).PAT->get() == Type::VoidTy)
error("void typed arguments are invalid");
- yyval.ArgVal = new std::pair<PATypeInfo, char*>(yyvsp[-1].TypeVal, yyvsp[0].StrVal);
- ;
- break;}
-case 214:
-#line 2538 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ArgList = yyvsp[-2].ArgList;
- yyval.ArgList->push_back(*yyvsp[0].ArgVal);
- delete yyvsp[0].ArgVal;
- ;
- break;}
-case 215:
-#line 2543 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ArgList = new std::vector<std::pair<PATypeInfo,char*> >();
- yyval.ArgList->push_back(*yyvsp[0].ArgVal);
- delete yyvsp[0].ArgVal;
- ;
- break;}
-case 216:
-#line 2551 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ArgList = yyvsp[0].ArgList; ;
- break;}
-case 217:
-#line 2552 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ArgList = yyvsp[-2].ArgList;
+ (yyval.ArgVal) = new std::pair<PATypeInfo, char*>((yyvsp[-1].TypeVal), (yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 215:
+#line 2538 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ArgList) = (yyvsp[-2].ArgList);
+ (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal));
+ delete (yyvsp[0].ArgVal);
+ ;}
+ break;
+
+ case 216:
+#line 2543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ArgList) = new std::vector<std::pair<PATypeInfo,char*> >();
+ (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal));
+ delete (yyvsp[0].ArgVal);
+ ;}
+ break;
+
+ case 217:
+#line 2551 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ArgList) = (yyvsp[0].ArgList); ;}
+ break;
+
+ case 218:
+#line 2552 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ArgList) = (yyvsp[-2].ArgList);
PATypeInfo VoidTI;
VoidTI.PAT = new PATypeHolder(Type::VoidTy);
VoidTI.S = Signless;
- yyval.ArgList->push_back(std::pair<PATypeInfo, char*>(VoidTI, 0));
- ;
- break;}
-case 218:
-#line 2559 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ArgList = new std::vector<std::pair<PATypeInfo,char*> >();
+ (yyval.ArgList)->push_back(std::pair<PATypeInfo, char*>(VoidTI, 0));
+ ;}
+ break;
+
+ case 219:
+#line 2559 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ArgList) = new std::vector<std::pair<PATypeInfo,char*> >();
PATypeInfo VoidTI;
VoidTI.PAT = new PATypeHolder(Type::VoidTy);
VoidTI.S = Signless;
- yyval.ArgList->push_back(std::pair<PATypeInfo, char*>(VoidTI, 0));
- ;
- break;}
-case 219:
-#line 2566 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ArgList = 0; ;
- break;}
-case 220:
-#line 2570 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- UnEscapeLexed(yyvsp[-5].StrVal);
- std::string FunctionName(yyvsp[-5].StrVal);
- free(yyvsp[-5].StrVal); // Free strdup'd memory!
+ (yyval.ArgList)->push_back(std::pair<PATypeInfo, char*>(VoidTI, 0));
+ ;}
+ break;
- const Type* RetTy = yyvsp[-6].TypeVal.PAT->get();
+ case 220:
+#line 2566 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ArgList) = 0; ;}
+ break;
+
+ case 221:
+#line 2570 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ UnEscapeLexed((yyvsp[-5].StrVal));
+ std::string FunctionName((yyvsp[-5].StrVal));
+ free((yyvsp[-5].StrVal)); // Free strdup'd memory!
+
+ const Type* RetTy = (yyvsp[-6].TypeVal).PAT->get();
if (!RetTy->isFirstClassType() && RetTy != Type::VoidTy)
error("LLVM functions cannot return aggregate types");
@@ -4295,9 +5092,9 @@ case 220:
} else if (FunctionName == "llvm.va_copy") {
ParamTyList.push_back(PointerType::get(Type::Int8Ty));
ParamTyList.push_back(PointerType::get(Type::Int8Ty));
- } else if (yyvsp[-3].ArgList) { // If there are arguments...
+ } else if ((yyvsp[-3].ArgList)) { // If there are arguments...
for (std::vector<std::pair<PATypeInfo,char*> >::iterator
- I = yyvsp[-3].ArgList->begin(), E = yyvsp[-3].ArgList->end(); I != E; ++I) {
+ I = (yyvsp[-3].ArgList)->begin(), E = (yyvsp[-3].ArgList)->end(); I != E; ++I) {
const Type *Ty = I->first.PAT->get();
ParamTyList.push_back(Ty);
}
@@ -4310,7 +5107,7 @@ case 220:
// Convert the CSRet calling convention into the corresponding parameter
// attribute.
FunctionType::ParamAttrsList ParamAttrs;
- if (yyvsp[-7].UIntVal == OldCallingConv::CSRet) {
+ if ((yyvsp[-7].UIntVal) == OldCallingConv::CSRet) {
ParamAttrs.push_back(FunctionType::NoAttributeSet); // result
ParamAttrs.push_back(FunctionType::StructRetAttribute); // first arg
}
@@ -4318,7 +5115,7 @@ case 220:
const FunctionType *FT = FunctionType::get(RetTy, ParamTyList, isVarArg,
ParamAttrs);
const PointerType *PFT = PointerType::get(FT);
- delete yyvsp[-6].TypeVal.PAT;
+ delete (yyvsp[-6].TypeVal).PAT;
ValID ID;
if (!FunctionName.empty()) {
@@ -4421,131 +5218,150 @@ case 220:
// argument to another function.
Fn->setLinkage(CurFun.Linkage);
}
- Fn->setCallingConv(upgradeCallingConv(yyvsp[-7].UIntVal));
- Fn->setAlignment(yyvsp[0].UIntVal);
- if (yyvsp[-1].StrVal) {
- Fn->setSection(yyvsp[-1].StrVal);
- free(yyvsp[-1].StrVal);
+ Fn->setCallingConv(upgradeCallingConv((yyvsp[-7].UIntVal)));
+ Fn->setAlignment((yyvsp[0].UIntVal));
+ if ((yyvsp[-1].StrVal)) {
+ Fn->setSection((yyvsp[-1].StrVal));
+ free((yyvsp[-1].StrVal));
}
// Add all of the arguments we parsed to the function...
- if (yyvsp[-3].ArgList) { // Is null if empty...
+ if ((yyvsp[-3].ArgList)) { // Is null if empty...
if (isVarArg) { // Nuke the last entry
- assert(yyvsp[-3].ArgList->back().first.PAT->get() == Type::VoidTy &&
- yyvsp[-3].ArgList->back().second == 0 && "Not a varargs marker");
- delete yyvsp[-3].ArgList->back().first.PAT;
- yyvsp[-3].ArgList->pop_back(); // Delete the last entry
+ assert((yyvsp[-3].ArgList)->back().first.PAT->get() == Type::VoidTy &&
+ (yyvsp[-3].ArgList)->back().second == 0 && "Not a varargs marker");
+ delete (yyvsp[-3].ArgList)->back().first.PAT;
+ (yyvsp[-3].ArgList)->pop_back(); // Delete the last entry
}
Function::arg_iterator ArgIt = Fn->arg_begin();
Function::arg_iterator ArgEnd = Fn->arg_end();
- std::vector<std::pair<PATypeInfo,char*> >::iterator I = yyvsp[-3].ArgList->begin();
- std::vector<std::pair<PATypeInfo,char*> >::iterator E = yyvsp[-3].ArgList->end();
+ std::vector<std::pair<PATypeInfo,char*> >::iterator I = (yyvsp[-3].ArgList)->begin();
+ std::vector<std::pair<PATypeInfo,char*> >::iterator E = (yyvsp[-3].ArgList)->end();
for ( ; I != E && ArgIt != ArgEnd; ++I, ++ArgIt) {
delete I->first.PAT; // Delete the typeholder...
setValueName(ArgIt, I->second); // Insert arg into symtab...
InsertValue(ArgIt);
}
- delete yyvsp[-3].ArgList; // We're now done with the argument list
+ delete (yyvsp[-3].ArgList); // We're now done with the argument list
}
- ;
- break;}
-case 223:
-#line 2750 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.FunctionVal = CurFun.CurrentFunction;
+ ;}
+ break;
+
+ case 224:
+#line 2750 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.FunctionVal) = CurFun.CurrentFunction;
// Make sure that we keep track of the linkage type even if there was a
// previous "declare".
- yyval.FunctionVal->setLinkage(yyvsp[-2].Linkage);
- ;
- break;}
-case 226:
-#line 2764 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
- ;
- break;}
-case 227:
-#line 2769 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
- break;}
-case 228:
-#line 2770 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::DLLImportLinkage; ;
- break;}
-case 229:
-#line 2771 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
- break;}
-case 230:
-#line 2775 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ CurFun.isDeclare = true; ;
- break;}
-case 231:
-#line 2776 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ CurFun.Linkage = yyvsp[0].Linkage; ;
- break;}
-case 232:
-#line 2776 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.FunctionVal = CurFun.CurrentFunction;
+ (yyval.FunctionVal)->setLinkage((yyvsp[-2].Linkage));
+ ;}
+ break;
+
+ case 227:
+#line 2764 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
+ ;}
+ break;
+
+ case 228:
+#line 2769 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
+ break;
+
+ case 229:
+#line 2770 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
+ break;
+
+ case 230:
+#line 2771 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
+ break;
+
+ case 231:
+#line 2775 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { CurFun.isDeclare = true; ;}
+ break;
+
+ case 232:
+#line 2776 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { CurFun.Linkage = (yyvsp[0].Linkage); ;}
+ break;
+
+ case 233:
+#line 2776 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.FunctionVal) = CurFun.CurrentFunction;
CurFun.FunctionDone();
- ;
- break;}
-case 233:
-#line 2788 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = false; ;
- break;}
-case 234:
-#line 2789 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = true; ;
- break;}
-case 235:
-#line 2794 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); ;
- break;}
-case 236:
-#line 2795 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); ;
- break;}
-case 237:
-#line 2796 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); ;
- break;}
-case 238:
-#line 2797 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(ConstantInt::get(Type::Int1Ty, true)); ;
- break;}
-case 239:
-#line 2798 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(ConstantInt::get(Type::Int1Ty, false)); ;
- break;}
-case 240:
-#line 2799 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::createNull(); ;
- break;}
-case 241:
-#line 2800 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::createUndef(); ;
- break;}
-case 242:
-#line 2801 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::createZeroInit(); ;
- break;}
-case 243:
-#line 2802 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Nonempty unsized packed vector
- const Type *ETy = (*yyvsp[-1].ConstVector)[0].C->getType();
- int NumElements = yyvsp[-1].ConstVector->size();
- PackedType* pt = PackedType::get(ETy, NumElements);
+ ;}
+ break;
+
+ case 234:
+#line 2788 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = false; ;}
+ break;
+
+ case 235:
+#line 2789 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = true; ;}
+ break;
+
+ case 236:
+#line 2794 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); ;}
+ break;
+
+ case 237:
+#line 2795 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); ;}
+ break;
+
+ case 238:
+#line 2796 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); ;}
+ break;
+
+ case 239:
+#line 2797 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, true)); ;}
+ break;
+
+ case 240:
+#line 2798 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, false)); ;}
+ break;
+
+ case 241:
+#line 2799 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::createNull(); ;}
+ break;
+
+ case 242:
+#line 2800 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::createUndef(); ;}
+ break;
+
+ case 243:
+#line 2801 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::createZeroInit(); ;}
+ break;
+
+ case 244:
+#line 2802 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Nonempty unsized packed vector
+ const Type *ETy = (*(yyvsp[-1].ConstVector))[0].C->getType();
+ int NumElements = (yyvsp[-1].ConstVector)->size();
+ VectorType* pt = VectorType::get(ETy, NumElements);
PATypeHolder* PTy = new PATypeHolder(
- HandleUpRefs(PackedType::get(ETy, NumElements)));
+ HandleUpRefs(VectorType::get(ETy, NumElements)));
// Verify all elements are correct type!
std::vector<Constant*> Elems;
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- Constant *C = (*yyvsp[-1].ConstVector)[i].C;
+ for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) {
+ Constant *C = (*(yyvsp[-1].ConstVector))[i].C;
const Type *CTy = C->getType();
if (ETy != CTy)
error("Element #" + utostr(i) + " is not of type '" +
@@ -4553,193 +5369,211 @@ case 243:
CTy->getDescription() + "'");
Elems.push_back(C);
}
- yyval.ValIDVal = ValID::create(ConstantPacked::get(pt, Elems));
- delete PTy; delete yyvsp[-1].ConstVector;
- ;
- break;}
-case 244:
-#line 2823 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal.C);
- ;
- break;}
-case 245:
-#line 2826 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- char *End = UnEscapeLexed(yyvsp[-2].StrVal, true);
- std::string AsmStr = std::string(yyvsp[-2].StrVal, End);
- End = UnEscapeLexed(yyvsp[0].StrVal, true);
- std::string Constraints = std::string(yyvsp[0].StrVal, End);
- yyval.ValIDVal = ValID::createInlineAsm(AsmStr, Constraints, yyvsp[-3].BoolVal);
- free(yyvsp[-2].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 246:
-#line 2841 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal); ;
- break;}
-case 247:
-#line 2842 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].StrVal); ;
- break;}
-case 250:
-#line 2855 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-1].TypeVal.PAT->get();
- yyval.ValueVal.S = yyvsp[-1].TypeVal.S;
- yyval.ValueVal.V = getVal(Ty, yyvsp[0].ValIDVal);
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 251:
-#line 2864 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
- ;
- break;}
-case 252:
-#line 2867 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Do not allow functions with 0 basic blocks
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
- ;
- break;}
-case 253:
-#line 2876 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal);
- InsertValue(yyvsp[0].TermInstVal);
- yyvsp[-2].BasicBlockVal->getInstList().push_back(yyvsp[0].TermInstVal);
- InsertValue(yyvsp[-2].BasicBlockVal);
- yyval.BasicBlockVal = yyvsp[-2].BasicBlockVal;
- ;
- break;}
-case 254:
-#line 2886 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].InstVal.I)
- yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal.I);
- yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal;
- ;
- break;}
-case 255:
-#line 2891 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true);
+ (yyval.ValIDVal) = ValID::create(ConstantVector::get(pt, Elems));
+ delete PTy; delete (yyvsp[-1].ConstVector);
+ ;}
+ break;
+
+ case 245:
+#line 2823 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal).C);
+ ;}
+ break;
+
+ case 246:
+#line 2826 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ char *End = UnEscapeLexed((yyvsp[-2].StrVal), true);
+ std::string AsmStr = std::string((yyvsp[-2].StrVal), End);
+ End = UnEscapeLexed((yyvsp[0].StrVal), true);
+ std::string Constraints = std::string((yyvsp[0].StrVal), End);
+ (yyval.ValIDVal) = ValID::createInlineAsm(AsmStr, Constraints, (yyvsp[-3].BoolVal));
+ free((yyvsp[-2].StrVal));
+ free((yyvsp[0].StrVal));
+ ;}
+ break;
+
+ case 247:
+#line 2841 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); ;}
+ break;
+
+ case 248:
+#line 2842 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); ;}
+ break;
+
+ case 251:
+#line 2855 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-1].TypeVal).PAT->get();
+ (yyval.ValueVal).S = (yyvsp[-1].TypeVal).S;
+ (yyval.ValueVal).V = getVal(Ty, (yyvsp[0].ValIDVal));
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 252:
+#line 2864 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
+ ;}
+ break;
+
+ case 253:
+#line 2867 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Do not allow functions with 0 basic blocks
+ (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
+ ;}
+ break;
+
+ case 254:
+#line 2876 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal));
+ InsertValue((yyvsp[0].TermInstVal));
+ (yyvsp[-2].BasicBlockVal)->getInstList().push_back((yyvsp[0].TermInstVal));
+ InsertValue((yyvsp[-2].BasicBlockVal));
+ (yyval.BasicBlockVal) = (yyvsp[-2].BasicBlockVal);
+ ;}
+ break;
+
+ case 255:
+#line 2886 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[0].InstVal).I)
+ (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal).I);
+ (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal);
+ ;}
+ break;
+
+ case 256:
+#line 2891 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true);
// Make sure to move the basic block to the correct location in the
// function, instead of leaving it inserted wherever it was first
// referenced.
Function::BasicBlockListType &BBL =
CurFun.CurrentFunction->getBasicBlockList();
- BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal);
- ;
- break;}
-case 256:
-#line 2900 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true);
+ BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal));
+ ;}
+ break;
+
+ case 257:
+#line 2900 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true);
// Make sure to move the basic block to the correct location in the
// function, instead of leaving it inserted wherever it was first
// referenced.
Function::BasicBlockListType &BBL =
CurFun.CurrentFunction->getBasicBlockList();
- BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal);
- ;
- break;}
-case 259:
-#line 2914 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Return with a result...
- yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal.V);
- ;
- break;}
-case 260:
-#line 2917 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Return with no result...
- yyval.TermInstVal = new ReturnInst();
- ;
- break;}
-case 261:
-#line 2920 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Unconditional Branch...
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
- yyval.TermInstVal = new BranchInst(tmpBB);
- ;
- break;}
-case 262:
-#line 2924 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- BasicBlock* tmpBBA = getBBVal(yyvsp[-3].ValIDVal);
- BasicBlock* tmpBBB = getBBVal(yyvsp[0].ValIDVal);
- Value* tmpVal = getVal(Type::Int1Ty, yyvsp[-6].ValIDVal);
- yyval.TermInstVal = new BranchInst(tmpBBA, tmpBBB, tmpVal);
- ;
- break;}
-case 263:
-#line 2930 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- Value* tmpVal = getVal(yyvsp[-7].PrimType.T, yyvsp[-6].ValIDVal);
- BasicBlock* tmpBB = getBBVal(yyvsp[-3].ValIDVal);
- SwitchInst *S = new SwitchInst(tmpVal, tmpBB, yyvsp[-1].JumpTable->size());
- yyval.TermInstVal = S;
- std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = yyvsp[-1].JumpTable->begin(),
- E = yyvsp[-1].JumpTable->end();
+ BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal));
+ ;}
+ break;
+
+ case 260:
+#line 2914 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Return with a result...
+ (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal).V);
+ ;}
+ break;
+
+ case 261:
+#line 2917 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Return with no result...
+ (yyval.TermInstVal) = new ReturnInst();
+ ;}
+ break;
+
+ case 262:
+#line 2920 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Unconditional Branch...
+ BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
+ (yyval.TermInstVal) = new BranchInst(tmpBB);
+ ;}
+ break;
+
+ case 263:
+#line 2924 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal));
+ BasicBlock* tmpBBB = getBBVal((yyvsp[0].ValIDVal));
+ Value* tmpVal = getVal(Type::Int1Ty, (yyvsp[-6].ValIDVal));
+ (yyval.TermInstVal) = new BranchInst(tmpBBA, tmpBBB, tmpVal);
+ ;}
+ break;
+
+ case 264:
+#line 2930 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ Value* tmpVal = getVal((yyvsp[-7].PrimType).T, (yyvsp[-6].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[-3].ValIDVal));
+ SwitchInst *S = new SwitchInst(tmpVal, tmpBB, (yyvsp[-1].JumpTable)->size());
+ (yyval.TermInstVal) = S;
+ std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = (yyvsp[-1].JumpTable)->begin(),
+ E = (yyvsp[-1].JumpTable)->end();
for (; I != E; ++I) {
if (ConstantInt *CI = dyn_cast<ConstantInt>(I->first))
S->addCase(CI, I->second);
else
error("Switch case is constant, but not a simple integer");
}
- delete yyvsp[-1].JumpTable;
- ;
- break;}
-case 264:
-#line 2945 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- Value* tmpVal = getVal(yyvsp[-6].PrimType.T, yyvsp[-5].ValIDVal);
- BasicBlock* tmpBB = getBBVal(yyvsp[-2].ValIDVal);
+ delete (yyvsp[-1].JumpTable);
+ ;}
+ break;
+
+ case 265:
+#line 2945 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ Value* tmpVal = getVal((yyvsp[-6].PrimType).T, (yyvsp[-5].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[-2].ValIDVal));
SwitchInst *S = new SwitchInst(tmpVal, tmpBB, 0);
- yyval.TermInstVal = S;
- ;
- break;}
-case 265:
-#line 2952 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ (yyval.TermInstVal) = S;
+ ;}
+ break;
+
+ case 266:
+#line 2952 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
const PointerType *PFTy;
const FunctionType *Ty;
- if (!(PFTy = dyn_cast<PointerType>(yyvsp[-10].TypeVal.PAT->get())) ||
+ if (!(PFTy = dyn_cast<PointerType>((yyvsp[-10].TypeVal).PAT->get())) ||
!(Ty = dyn_cast<FunctionType>(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector<const Type*> ParamTypes;
- if (yyvsp[-7].ValueList) {
- for (std::vector<ValueInfo>::iterator I = yyvsp[-7].ValueList->begin(), E = yyvsp[-7].ValueList->end();
+ if ((yyvsp[-7].ValueList)) {
+ for (std::vector<ValueInfo>::iterator I = (yyvsp[-7].ValueList)->begin(), E = (yyvsp[-7].ValueList)->end();
I != E; ++I)
ParamTypes.push_back((*I).V->getType());
}
FunctionType::ParamAttrsList ParamAttrs;
- if (yyvsp[-11].UIntVal == OldCallingConv::CSRet) {
+ if ((yyvsp[-11].UIntVal) == OldCallingConv::CSRet) {
ParamAttrs.push_back(FunctionType::NoAttributeSet);
ParamAttrs.push_back(FunctionType::StructRetAttribute);
}
bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy;
if (isVarArg) ParamTypes.pop_back();
- Ty = FunctionType::get(yyvsp[-10].TypeVal.PAT->get(), ParamTypes, isVarArg, ParamAttrs);
+ Ty = FunctionType::get((yyvsp[-10].TypeVal).PAT->get(), ParamTypes, isVarArg, ParamAttrs);
PFTy = PointerType::get(Ty);
}
- Value *V = getVal(PFTy, yyvsp[-9].ValIDVal); // Get the function we're calling...
- BasicBlock *Normal = getBBVal(yyvsp[-3].ValIDVal);
- BasicBlock *Except = getBBVal(yyvsp[0].ValIDVal);
+ Value *V = getVal(PFTy, (yyvsp[-9].ValIDVal)); // Get the function we're calling...
+ BasicBlock *Normal = getBBVal((yyvsp[-3].ValIDVal));
+ BasicBlock *Except = getBBVal((yyvsp[0].ValIDVal));
// Create the call node...
- if (!yyvsp[-7].ValueList) { // Has no arguments?
- yyval.TermInstVal = new InvokeInst(V, Normal, Except, 0, 0);
+ if (!(yyvsp[-7].ValueList)) { // Has no arguments?
+ (yyval.TermInstVal) = new InvokeInst(V, Normal, Except, 0, 0);
} else { // Has arguments?
// Loop through FunctionType's arguments and ensure they are specified
// correctly!
//
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- std::vector<ValueInfo>::iterator ArgI = yyvsp[-7].ValueList->begin(), ArgE = yyvsp[-7].ValueList->end();
+ std::vector<ValueInfo>::iterator ArgI = (yyvsp[-7].ValueList)->begin(), ArgE = (yyvsp[-7].ValueList)->end();
std::vector<Value*> Args;
for (; ArgI != ArgE && I != E; ++ArgI, ++I) {
@@ -4752,59 +5586,64 @@ case 265:
if (I != E || (ArgI != ArgE && !Ty->isVarArg()))
error("Invalid number of parameters detected");
- yyval.TermInstVal = new InvokeInst(V, Normal, Except, &Args[0], Args.size());
+ (yyval.TermInstVal) = new InvokeInst(V, Normal, Except, &Args[0], Args.size());
}
- cast<InvokeInst>(yyval.TermInstVal)->setCallingConv(upgradeCallingConv(yyvsp[-11].UIntVal));
- delete yyvsp[-10].TypeVal.PAT;
- delete yyvsp[-7].ValueList;
- ;
- break;}
-case 266:
-#line 3007 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TermInstVal = new UnwindInst();
- ;
- break;}
-case 267:
-#line 3010 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TermInstVal = new UnreachableInst();
- ;
- break;}
-case 268:
-#line 3016 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.JumpTable = yyvsp[-5].JumpTable;
- Constant *V = cast<Constant>(getExistingValue(yyvsp[-4].PrimType.T, yyvsp[-3].ValIDVal));
+ cast<InvokeInst>((yyval.TermInstVal))->setCallingConv(upgradeCallingConv((yyvsp[-11].UIntVal)));
+ delete (yyvsp[-10].TypeVal).PAT;
+ delete (yyvsp[-7].ValueList);
+ ;}
+ break;
+
+ case 267:
+#line 3007 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TermInstVal) = new UnwindInst();
+ ;}
+ break;
+
+ case 268:
+#line 3010 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TermInstVal) = new UnreachableInst();
+ ;}
+ break;
+
+ case 269:
+#line 3016 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.JumpTable) = (yyvsp[-5].JumpTable);
+ Constant *V = cast<Constant>(getExistingValue((yyvsp[-4].PrimType).T, (yyvsp[-3].ValIDVal)));
if (V == 0)
error("May only switch on a constant pool value");
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
- yyval.JumpTable->push_back(std::make_pair(V, tmpBB));
- ;
- break;}
-case 269:
-#line 3026 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.JumpTable = new std::vector<std::pair<Constant*, BasicBlock*> >();
- Constant *V = cast<Constant>(getExistingValue(yyvsp[-4].PrimType.T, yyvsp[-3].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
+ (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB));
+ ;}
+ break;
+
+ case 270:
+#line 3026 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.JumpTable) = new std::vector<std::pair<Constant*, BasicBlock*> >();
+ Constant *V = cast<Constant>(getExistingValue((yyvsp[-4].PrimType).T, (yyvsp[-3].ValIDVal)));
if (V == 0)
error("May only switch on a constant pool value");
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
- yyval.JumpTable->push_back(std::make_pair(V, tmpBB));
- ;
- break;}
-case 270:
-#line 3039 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
+ (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB));
+ ;}
+ break;
+
+ case 271:
+#line 3039 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
bool omit = false;
- if (yyvsp[-1].StrVal)
- if (BitCastInst *BCI = dyn_cast<BitCastInst>(yyvsp[0].InstVal.I))
+ if ((yyvsp[-1].StrVal))
+ if (BitCastInst *BCI = dyn_cast<BitCastInst>((yyvsp[0].InstVal).I))
if (BCI->getSrcTy() == BCI->getDestTy() &&
- BCI->getOperand(0)->getName() == yyvsp[-1].StrVal)
+ BCI->getOperand(0)->getName() == (yyvsp[-1].StrVal))
// This is a useless bit cast causing a name redefinition. It is
// a bit cast from a type to the same type of an operand with the
// same name as the name we would give this instruction. Since this
@@ -4819,225 +5658,243 @@ case 270:
// The bitcast is clearly useless so we omit it.
omit = true;
if (omit) {
- yyval.InstVal.I = 0;
- yyval.InstVal.S = Signless;
+ (yyval.InstVal).I = 0;
+ (yyval.InstVal).S = Signless;
} else {
- setValueName(yyvsp[0].InstVal.I, yyvsp[-1].StrVal);
- InsertValue(yyvsp[0].InstVal.I);
- yyval.InstVal = yyvsp[0].InstVal;
+ setValueName((yyvsp[0].InstVal).I, (yyvsp[-1].StrVal));
+ InsertValue((yyvsp[0].InstVal).I);
+ (yyval.InstVal) = (yyvsp[0].InstVal);
}
- ;
- break;}
-case 271:
-#line 3068 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Used for PHI nodes
- yyval.PHIList.P = new std::list<std::pair<Value*, BasicBlock*> >();
- yyval.PHIList.S = yyvsp[-5].TypeVal.S;
- Value* tmpVal = getVal(yyvsp[-5].TypeVal.PAT->get(), yyvsp[-3].ValIDVal);
- BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal);
- yyval.PHIList.P->push_back(std::make_pair(tmpVal, tmpBB));
- delete yyvsp[-5].TypeVal.PAT;
- ;
- break;}
-case 272:
-#line 3076 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.PHIList = yyvsp[-6].PHIList;
- Value* tmpVal = getVal(yyvsp[-6].PHIList.P->front().first->getType(), yyvsp[-3].ValIDVal);
- BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal);
- yyvsp[-6].PHIList.P->push_back(std::make_pair(tmpVal, tmpBB));
- ;
- break;}
-case 273:
-#line 3084 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Used for call statements, and memory insts...
- yyval.ValueList = new std::vector<ValueInfo>();
- yyval.ValueList->push_back(yyvsp[0].ValueVal);
- ;
- break;}
-case 274:
-#line 3088 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ValueList = yyvsp[-2].ValueList;
- yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal);
- ;
- break;}
-case 276:
-#line 3096 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValueList = 0; ;
- break;}
-case 277:
-#line 3100 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.BoolVal = true;
- ;
- break;}
-case 278:
-#line 3103 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.BoolVal = false;
- ;
- break;}
-case 279:
-#line 3109 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-3].TypeVal.PAT->get();
- if (!Ty->isInteger() && !Ty->isFloatingPoint() && !isa<PackedType>(Ty))
+ ;}
+ break;
+
+ case 272:
+#line 3068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Used for PHI nodes
+ (yyval.PHIList).P = new std::list<std::pair<Value*, BasicBlock*> >();
+ (yyval.PHIList).S = (yyvsp[-5].TypeVal).S;
+ Value* tmpVal = getVal((yyvsp[-5].TypeVal).PAT->get(), (yyvsp[-3].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal));
+ (yyval.PHIList).P->push_back(std::make_pair(tmpVal, tmpBB));
+ delete (yyvsp[-5].TypeVal).PAT;
+ ;}
+ break;
+
+ case 273:
+#line 3076 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.PHIList) = (yyvsp[-6].PHIList);
+ Value* tmpVal = getVal((yyvsp[-6].PHIList).P->front().first->getType(), (yyvsp[-3].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal));
+ (yyvsp[-6].PHIList).P->push_back(std::make_pair(tmpVal, tmpBB));
+ ;}
+ break;
+
+ case 274:
+#line 3084 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { // Used for call statements, and memory insts...
+ (yyval.ValueList) = new std::vector<ValueInfo>();
+ (yyval.ValueList)->push_back((yyvsp[0].ValueVal));
+ ;}
+ break;
+
+ case 275:
+#line 3088 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ValueList) = (yyvsp[-2].ValueList);
+ (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal));
+ ;}
+ break;
+
+ case 277:
+#line 3096 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValueList) = 0; ;}
+ break;
+
+ case 278:
+#line 3100 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.BoolVal) = true;
+ ;}
+ break;
+
+ case 279:
+#line 3103 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.BoolVal) = false;
+ ;}
+ break;
+
+ case 280:
+#line 3109 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[-3].TypeVal).PAT->get();
+ if (!Ty->isInteger() && !Ty->isFloatingPoint() && !isa<VectorType>(Ty))
error("Arithmetic operator requires integer, FP, or packed operands");
- if (isa<PackedType>(Ty) &&
- (yyvsp[-4].BinaryOpVal == URemOp || yyvsp[-4].BinaryOpVal == SRemOp || yyvsp[-4].BinaryOpVal == FRemOp || yyvsp[-4].BinaryOpVal == RemOp))
+ if (isa<VectorType>(Ty) &&
+ ((yyvsp[-4].BinaryOpVal) == URemOp || (yyvsp[-4].BinaryOpVal) == SRemOp || (yyvsp[-4].BinaryOpVal) == FRemOp || (yyvsp[-4].BinaryOpVal) == RemOp))
error("Remainder not supported on packed types");
// Upgrade the opcode from obsolete versions before we do anything with it.
- Instruction::BinaryOps Opcode = getBinaryOp(yyvsp[-4].BinaryOpVal, Ty, yyvsp[-3].TypeVal.S);
- Value* val1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* val2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = BinaryOperator::create(Opcode, val1, val2);
- if (yyval.InstVal.I == 0)
+ Instruction::BinaryOps Opcode = getBinaryOp((yyvsp[-4].BinaryOpVal), Ty, (yyvsp[-3].TypeVal).S);
+ Value* val1 = getVal(Ty, (yyvsp[-2].ValIDVal));
+ Value* val2 = getVal(Ty, (yyvsp[0].ValIDVal));
+ (yyval.InstVal).I = BinaryOperator::create(Opcode, val1, val2);
+ if ((yyval.InstVal).I == 0)
error("binary operator returned null");
- yyval.InstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 280:
-#line 3126 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-3].TypeVal.PAT->get();
+ (yyval.InstVal).S = (yyvsp[-3].TypeVal).S;
+ delete (yyvsp[-3].TypeVal).PAT;
+ ;}
+ break;
+
+ case 281:
+#line 3126 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-3].TypeVal).PAT->get();
if (!Ty->isInteger()) {
- if (!isa<PackedType>(Ty) ||
- !cast<PackedType>(Ty)->getElementType()->isInteger())
+ if (!isa<VectorType>(Ty) ||
+ !cast<VectorType>(Ty)->getElementType()->isInteger())
error("Logical operator requires integral operands");
}
- Instruction::BinaryOps Opcode = getBinaryOp(yyvsp[-4].BinaryOpVal, Ty, yyvsp[-3].TypeVal.S);
- Value* tmpVal1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* tmpVal2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = BinaryOperator::create(Opcode, tmpVal1, tmpVal2);
- if (yyval.InstVal.I == 0)
+ Instruction::BinaryOps Opcode = getBinaryOp((yyvsp[-4].BinaryOpVal), Ty, (yyvsp[-3].TypeVal).S);
+ Value* tmpVal1 = getVal(Ty, (yyvsp[-2].ValIDVal));
+ Value* tmpVal2 = getVal(Ty, (yyvsp[0].ValIDVal));
+ (yyval.InstVal).I = BinaryOperator::create(Opcode, tmpVal1, tmpVal2);
+ if ((yyval.InstVal).I == 0)
error("binary operator returned null");
- yyval.InstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 281:
-#line 3142 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-3].TypeVal.PAT->get();
- if(isa<PackedType>(Ty))
- error("PackedTypes currently not supported in setcc instructions");
+ (yyval.InstVal).S = (yyvsp[-3].TypeVal).S;
+ delete (yyvsp[-3].TypeVal).PAT;
+ ;}
+ break;
+
+ case 282:
+#line 3142 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[-3].TypeVal).PAT->get();
+ if(isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in setcc instructions");
unsigned short pred;
- Instruction::OtherOps Opcode = getCompareOp(yyvsp[-4].BinaryOpVal, pred, Ty, yyvsp[-3].TypeVal.S);
- Value* tmpVal1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* tmpVal2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = CmpInst::create(Opcode, pred, tmpVal1, tmpVal2);
- if (yyval.InstVal.I == 0)
+ Instruction::OtherOps Opcode = getCompareOp((yyvsp[-4].BinaryOpVal), pred, Ty, (yyvsp[-3].TypeVal).S);
+ Value* tmpVal1 = getVal(Ty, (yyvsp[-2].ValIDVal));
+ Value* tmpVal2 = getVal(Ty, (yyvsp[0].ValIDVal));
+ (yyval.InstVal).I = CmpInst::create(Opcode, pred, tmpVal1, tmpVal2);
+ if ((yyval.InstVal).I == 0)
error("binary operator returned null");
- yyval.InstVal.S = Unsigned;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 282:
-#line 3156 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-3].TypeVal.PAT->get();
- if (isa<PackedType>(Ty))
- error("PackedTypes currently not supported in icmp instructions");
+ (yyval.InstVal).S = Unsigned;
+ delete (yyvsp[-3].TypeVal).PAT;
+ ;}
+ break;
+
+ case 283:
+#line 3156 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-3].TypeVal).PAT->get();
+ if (isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in icmp instructions");
else if (!Ty->isInteger() && !isa<PointerType>(Ty))
error("icmp requires integer or pointer typed operands");
- Value* tmpVal1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* tmpVal2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = new ICmpInst(yyvsp[-4].IPred, tmpVal1, tmpVal2);
- yyval.InstVal.S = Unsigned;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 283:
-#line 3168 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-3].TypeVal.PAT->get();
- if (isa<PackedType>(Ty))
- error("PackedTypes currently not supported in fcmp instructions");
+ Value* tmpVal1 = getVal(Ty, (yyvsp[-2].ValIDVal));
+ Value* tmpVal2 = getVal(Ty, (yyvsp[0].ValIDVal));
+ (yyval.InstVal).I = new ICmpInst((yyvsp[-4].IPred), tmpVal1, tmpVal2);
+ (yyval.InstVal).S = Unsigned;
+ delete (yyvsp[-3].TypeVal).PAT;
+ ;}
+ break;
+
+ case 284:
+#line 3168 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-3].TypeVal).PAT->get();
+ if (isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in fcmp instructions");
else if (!Ty->isFloatingPoint())
error("fcmp instruction requires floating point operands");
- Value* tmpVal1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* tmpVal2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = new FCmpInst(yyvsp[-4].FPred, tmpVal1, tmpVal2);
- yyval.InstVal.S = Unsigned;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 284:
-#line 3180 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ Value* tmpVal1 = getVal(Ty, (yyvsp[-2].ValIDVal));
+ Value* tmpVal2 = getVal(Ty, (yyvsp[0].ValIDVal));
+ (yyval.InstVal).I = new FCmpInst((yyvsp[-4].FPred), tmpVal1, tmpVal2);
+ (yyval.InstVal).S = Unsigned;
+ delete (yyvsp[-3].TypeVal).PAT;
+ ;}
+ break;
+
+ case 285:
+#line 3180 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
warning("Use of obsolete 'not' instruction: Replacing with 'xor");
- const Type *Ty = yyvsp[0].ValueVal.V->getType();
+ const Type *Ty = (yyvsp[0].ValueVal).V->getType();
Value *Ones = ConstantInt::getAllOnesValue(Ty);
if (Ones == 0)
error("Expected integral type for not instruction");
- yyval.InstVal.I = BinaryOperator::create(Instruction::Xor, yyvsp[0].ValueVal.V, Ones);
- if (yyval.InstVal.I == 0)
+ (yyval.InstVal).I = BinaryOperator::create(Instruction::Xor, (yyvsp[0].ValueVal).V, Ones);
+ if ((yyval.InstVal).I == 0)
error("Could not create a xor instruction");
- yyval.InstVal.S = yyvsp[0].ValueVal.S
- ;
- break;}
-case 285:
-#line 3191 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!yyvsp[0].ValueVal.V->getType()->isInteger() ||
- cast<IntegerType>(yyvsp[0].ValueVal.V->getType())->getBitWidth() != 8)
+ (yyval.InstVal).S = (yyvsp[0].ValueVal).S
+ ;}
+ break;
+
+ case 286:
+#line 3191 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!(yyvsp[0].ValueVal).V->getType()->isInteger() ||
+ cast<IntegerType>((yyvsp[0].ValueVal).V->getType())->getBitWidth() != 8)
error("Shift amount must be int8");
- const Type* Ty = yyvsp[-2].ValueVal.V->getType();
+ const Type* Ty = (yyvsp[-2].ValueVal).V->getType();
if (!Ty->isInteger())
error("Shift constant expression requires integer operand");
Value* ShiftAmt = 0;
if (cast<IntegerType>(Ty)->getBitWidth() > Type::Int8Ty->getBitWidth())
- if (Constant *C = dyn_cast<Constant>(yyvsp[0].ValueVal.V))
+ if (Constant *C = dyn_cast<Constant>((yyvsp[0].ValueVal).V))
ShiftAmt = ConstantExpr::getZExt(C, Ty);
else
- ShiftAmt = new ZExtInst(yyvsp[0].ValueVal.V, Ty, makeNameUnique("shift"), CurBB);
+ ShiftAmt = new ZExtInst((yyvsp[0].ValueVal).V, Ty, makeNameUnique("shift"), CurBB);
else
- ShiftAmt = yyvsp[0].ValueVal.V;
- yyval.InstVal.I = BinaryOperator::create(getBinaryOp(yyvsp[-3].BinaryOpVal, Ty, yyvsp[-2].ValueVal.S), yyvsp[-2].ValueVal.V, ShiftAmt);
- yyval.InstVal.S = yyvsp[-2].ValueVal.S;
- ;
- break;}
-case 286:
-#line 3209 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *DstTy = yyvsp[0].TypeVal.PAT->get();
+ ShiftAmt = (yyvsp[0].ValueVal).V;
+ (yyval.InstVal).I = BinaryOperator::create(getBinaryOp((yyvsp[-3].BinaryOpVal), Ty, (yyvsp[-2].ValueVal).S), (yyvsp[-2].ValueVal).V, ShiftAmt);
+ (yyval.InstVal).S = (yyvsp[-2].ValueVal).S;
+ ;}
+ break;
+
+ case 287:
+#line 3209 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *DstTy = (yyvsp[0].TypeVal).PAT->get();
if (!DstTy->isFirstClassType())
error("cast instruction to a non-primitive type: '" +
DstTy->getDescription() + "'");
- yyval.InstVal.I = cast<Instruction>(getCast(yyvsp[-3].CastOpVal, yyvsp[-2].ValueVal.V, yyvsp[-2].ValueVal.S, DstTy, yyvsp[0].TypeVal.S, true));
- yyval.InstVal.S = yyvsp[0].TypeVal.S;
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 287:
-#line 3218 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!yyvsp[-4].ValueVal.V->getType()->isInteger() ||
- cast<IntegerType>(yyvsp[-4].ValueVal.V->getType())->getBitWidth() != 1)
+ (yyval.InstVal).I = cast<Instruction>(getCast((yyvsp[-3].CastOpVal), (yyvsp[-2].ValueVal).V, (yyvsp[-2].ValueVal).S, DstTy, (yyvsp[0].TypeVal).S, true));
+ (yyval.InstVal).S = (yyvsp[0].TypeVal).S;
+ delete (yyvsp[0].TypeVal).PAT;
+ ;}
+ break;
+
+ case 288:
+#line 3218 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!(yyvsp[-4].ValueVal).V->getType()->isInteger() ||
+ cast<IntegerType>((yyvsp[-4].ValueVal).V->getType())->getBitWidth() != 1)
error("select condition must be bool");
- if (yyvsp[-2].ValueVal.V->getType() != yyvsp[0].ValueVal.V->getType())
+ if ((yyvsp[-2].ValueVal).V->getType() != (yyvsp[0].ValueVal).V->getType())
error("select value types should match");
- yyval.InstVal.I = new SelectInst(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V);
- yyval.InstVal.S = yyvsp[-4].ValueVal.S;
- ;
- break;}
-case 288:
-#line 3227 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].TypeVal.PAT->get();
+ (yyval.InstVal).I = new SelectInst((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V);
+ (yyval.InstVal).S = (yyvsp[-4].ValueVal).S;
+ ;}
+ break;
+
+ case 289:
+#line 3227 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[0].TypeVal).PAT->get();
NewVarArgs = true;
- yyval.InstVal.I = new VAArgInst(yyvsp[-2].ValueVal.V, Ty);
- yyval.InstVal.S = yyvsp[0].TypeVal.S;
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 289:
-#line 3234 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* ArgTy = yyvsp[-2].ValueVal.V->getType();
- const Type* DstTy = yyvsp[0].TypeVal.PAT->get();
+ (yyval.InstVal).I = new VAArgInst((yyvsp[-2].ValueVal).V, Ty);
+ (yyval.InstVal).S = (yyvsp[0].TypeVal).S;
+ delete (yyvsp[0].TypeVal).PAT;
+ ;}
+ break;
+
+ case 290:
+#line 3234 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* ArgTy = (yyvsp[-2].ValueVal).V->getType();
+ const Type* DstTy = (yyvsp[0].TypeVal).PAT->get();
ObsoleteVarArgs = true;
Function* NF = cast<Function>(CurModule.CurrentModule->
getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, (Type *)0));
@@ -5049,19 +5906,20 @@ case 289:
//b = vaarg foo, t
AllocaInst* foo = new AllocaInst(ArgTy, 0, "vaarg.fix");
CurBB->getInstList().push_back(foo);
- CallInst* bar = new CallInst(NF, yyvsp[-2].ValueVal.V);
+ CallInst* bar = new CallInst(NF, (yyvsp[-2].ValueVal).V);
CurBB->getInstList().push_back(bar);
CurBB->getInstList().push_back(new StoreInst(bar, foo));
- yyval.InstVal.I = new VAArgInst(foo, DstTy);
- yyval.InstVal.S = yyvsp[0].TypeVal.S;
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 290:
-#line 3255 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* ArgTy = yyvsp[-2].ValueVal.V->getType();
- const Type* DstTy = yyvsp[0].TypeVal.PAT->get();
+ (yyval.InstVal).I = new VAArgInst(foo, DstTy);
+ (yyval.InstVal).S = (yyvsp[0].TypeVal).S;
+ delete (yyvsp[0].TypeVal).PAT;
+ ;}
+ break;
+
+ case 291:
+#line 3255 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* ArgTy = (yyvsp[-2].ValueVal).V->getType();
+ const Type* DstTy = (yyvsp[0].TypeVal).PAT->get();
ObsoleteVarArgs = true;
Function* NF = cast<Function>(CurModule.CurrentModule->
getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, (Type *)0));
@@ -5074,88 +5932,93 @@ case 290:
//b = load foo
AllocaInst* foo = new AllocaInst(ArgTy, 0, "vanext.fix");
CurBB->getInstList().push_back(foo);
- CallInst* bar = new CallInst(NF, yyvsp[-2].ValueVal.V);
+ CallInst* bar = new CallInst(NF, (yyvsp[-2].ValueVal).V);
CurBB->getInstList().push_back(bar);
CurBB->getInstList().push_back(new StoreInst(bar, foo));
Instruction* tmp = new VAArgInst(foo, DstTy);
CurBB->getInstList().push_back(tmp);
- yyval.InstVal.I = new LoadInst(foo);
- yyval.InstVal.S = yyvsp[0].TypeVal.S;
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 291:
-#line 3279 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!ExtractElementInst::isValidOperands(yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V))
+ (yyval.InstVal).I = new LoadInst(foo);
+ (yyval.InstVal).S = (yyvsp[0].TypeVal).S;
+ delete (yyvsp[0].TypeVal).PAT;
+ ;}
+ break;
+
+ case 292:
+#line 3279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V))
error("Invalid extractelement operands");
- yyval.InstVal.I = new ExtractElementInst(yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V);
- yyval.InstVal.S = yyvsp[-2].ValueVal.S;
- ;
- break;}
-case 292:
-#line 3285 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!InsertElementInst::isValidOperands(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V))
+ (yyval.InstVal).I = new ExtractElementInst((yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V);
+ (yyval.InstVal).S = (yyvsp[-2].ValueVal).S;
+ ;}
+ break;
+
+ case 293:
+#line 3285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V))
error("Invalid insertelement operands");
- yyval.InstVal.I = new InsertElementInst(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V);
- yyval.InstVal.S = yyvsp[-4].ValueVal.S;
- ;
- break;}
-case 293:
-#line 3291 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!ShuffleVectorInst::isValidOperands(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V))
+ (yyval.InstVal).I = new InsertElementInst((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V);
+ (yyval.InstVal).S = (yyvsp[-4].ValueVal).S;
+ ;}
+ break;
+
+ case 294:
+#line 3291 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V))
error("Invalid shufflevector operands");
- yyval.InstVal.I = new ShuffleVectorInst(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V);
- yyval.InstVal.S = yyvsp[-4].ValueVal.S;
- ;
- break;}
-case 294:
-#line 3297 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].PHIList.P->front().first->getType();
+ (yyval.InstVal).I = new ShuffleVectorInst((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V);
+ (yyval.InstVal).S = (yyvsp[-4].ValueVal).S;
+ ;}
+ break;
+
+ case 295:
+#line 3297 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[0].PHIList).P->front().first->getType();
if (!Ty->isFirstClassType())
error("PHI node operands must be of first class type");
PHINode *PHI = new PHINode(Ty);
- PHI->reserveOperandSpace(yyvsp[0].PHIList.P->size());
- while (yyvsp[0].PHIList.P->begin() != yyvsp[0].PHIList.P->end()) {
- if (yyvsp[0].PHIList.P->front().first->getType() != Ty)
+ PHI->reserveOperandSpace((yyvsp[0].PHIList).P->size());
+ while ((yyvsp[0].PHIList).P->begin() != (yyvsp[0].PHIList).P->end()) {
+ if ((yyvsp[0].PHIList).P->front().first->getType() != Ty)
error("All elements of a PHI node must be of the same type");
- PHI->addIncoming(yyvsp[0].PHIList.P->front().first, yyvsp[0].PHIList.P->front().second);
- yyvsp[0].PHIList.P->pop_front();
+ PHI->addIncoming((yyvsp[0].PHIList).P->front().first, (yyvsp[0].PHIList).P->front().second);
+ (yyvsp[0].PHIList).P->pop_front();
}
- yyval.InstVal.I = PHI;
- yyval.InstVal.S = yyvsp[0].PHIList.S;
- delete yyvsp[0].PHIList.P; // Free the list...
- ;
- break;}
-case 295:
-#line 3313 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ (yyval.InstVal).I = PHI;
+ (yyval.InstVal).S = (yyvsp[0].PHIList).S;
+ delete (yyvsp[0].PHIList).P; // Free the list...
+ ;}
+ break;
+
+ case 296:
+#line 3313 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
// Handle the short call syntax
const PointerType *PFTy;
const FunctionType *FTy;
- if (!(PFTy = dyn_cast<PointerType>(yyvsp[-4].TypeVal.PAT->get())) ||
+ if (!(PFTy = dyn_cast<PointerType>((yyvsp[-4].TypeVal).PAT->get())) ||
!(FTy = dyn_cast<FunctionType>(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector<const Type*> ParamTypes;
- if (yyvsp[-1].ValueList) {
- for (std::vector<ValueInfo>::iterator I = yyvsp[-1].ValueList->begin(), E = yyvsp[-1].ValueList->end();
+ if ((yyvsp[-1].ValueList)) {
+ for (std::vector<ValueInfo>::iterator I = (yyvsp[-1].ValueList)->begin(), E = (yyvsp[-1].ValueList)->end();
I != E; ++I)
ParamTypes.push_back((*I).V->getType());
}
FunctionType::ParamAttrsList ParamAttrs;
- if (yyvsp[-5].UIntVal == OldCallingConv::CSRet) {
+ if ((yyvsp[-5].UIntVal) == OldCallingConv::CSRet) {
ParamAttrs.push_back(FunctionType::NoAttributeSet);
ParamAttrs.push_back(FunctionType::StructRetAttribute);
}
bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy;
if (isVarArg) ParamTypes.pop_back();
- const Type *RetTy = yyvsp[-4].TypeVal.PAT->get();
+ const Type *RetTy = (yyvsp[-4].TypeVal).PAT->get();
if (!RetTy->isFirstClassType() && RetTy != Type::VoidTy)
error("Functions cannot return aggregate types");
@@ -5165,21 +6028,21 @@ case 295:
// First upgrade any intrinsic calls.
std::vector<Value*> Args;
- if (yyvsp[-1].ValueList)
- for (unsigned i = 0, e = yyvsp[-1].ValueList->size(); i < e; ++i)
- Args.push_back((*yyvsp[-1].ValueList)[i].V);
- Instruction *Inst = upgradeIntrinsicCall(FTy, yyvsp[-3].ValIDVal, Args);
+ if ((yyvsp[-1].ValueList))
+ for (unsigned i = 0, e = (yyvsp[-1].ValueList)->size(); i < e; ++i)
+ Args.push_back((*(yyvsp[-1].ValueList))[i].V);
+ Instruction *Inst = upgradeIntrinsicCall(FTy, (yyvsp[-3].ValIDVal), Args);
// If we got an upgraded intrinsic
if (Inst) {
- yyval.InstVal.I = Inst;
- yyval.InstVal.S = Signless;
+ (yyval.InstVal).I = Inst;
+ (yyval.InstVal).S = Signless;
} else {
// Get the function we're calling
- Value *V = getVal(PFTy, yyvsp[-3].ValIDVal);
+ Value *V = getVal(PFTy, (yyvsp[-3].ValIDVal));
// Check the argument values match
- if (!yyvsp[-1].ValueList) { // Has no arguments?
+ if (!(yyvsp[-1].ValueList)) { // Has no arguments?
// Make sure no arguments is a good thing!
if (FTy->getNumParams() != 0)
error("No arguments passed to a function that expects arguments");
@@ -5189,7 +6052,7 @@ case 295:
//
FunctionType::param_iterator I = FTy->param_begin();
FunctionType::param_iterator E = FTy->param_end();
- std::vector<ValueInfo>::iterator ArgI = yyvsp[-1].ValueList->begin(), ArgE = yyvsp[-1].ValueList->end();
+ std::vector<ValueInfo>::iterator ArgI = (yyvsp[-1].ValueList)->begin(), ArgE = (yyvsp[-1].ValueList)->end();
for (; ArgI != ArgE && I != E; ++ArgI, ++I)
if ((*ArgI).V->getType() != *I)
@@ -5202,112 +6065,124 @@ case 295:
// Create the call instruction
CallInst *CI = new CallInst(V, &Args[0], Args.size());
- CI->setTailCall(yyvsp[-6].BoolVal);
- CI->setCallingConv(upgradeCallingConv(yyvsp[-5].UIntVal));
- yyval.InstVal.I = CI;
- yyval.InstVal.S = yyvsp[-4].TypeVal.S;
+ CI->setTailCall((yyvsp[-6].BoolVal));
+ CI->setCallingConv(upgradeCallingConv((yyvsp[-5].UIntVal)));
+ (yyval.InstVal).I = CI;
+ (yyval.InstVal).S = (yyvsp[-4].TypeVal).S;
}
- delete yyvsp[-4].TypeVal.PAT;
- delete yyvsp[-1].ValueList;
- ;
- break;}
-case 296:
-#line 3391 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.InstVal = yyvsp[0].InstVal;
- ;
- break;}
-case 297:
-#line 3399 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValueList = yyvsp[0].ValueList; ;
- break;}
-case 298:
-#line 3400 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValueList = new std::vector<ValueInfo>(); ;
- break;}
-case 299:
-#line 3404 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = true; ;
- break;}
-case 300:
-#line 3405 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = false; ;
- break;}
-case 301:
-#line 3409 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-1].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-1].TypeVal.S;
- yyval.InstVal.I = new MallocInst(Ty, 0, yyvsp[0].UIntVal);
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 302:
-#line 3415 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-4].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-4].TypeVal.S;
- yyval.InstVal.I = new MallocInst(Ty, getVal(yyvsp[-2].PrimType.T, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal);
- delete yyvsp[-4].TypeVal.PAT;
- ;
- break;}
-case 303:
-#line 3421 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-1].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-1].TypeVal.S;
- yyval.InstVal.I = new AllocaInst(Ty, 0, yyvsp[0].UIntVal);
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 304:
-#line 3427 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-4].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-4].TypeVal.S;
- yyval.InstVal.I = new AllocaInst(Ty, getVal(yyvsp[-2].PrimType.T, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal);
- delete yyvsp[-4].TypeVal.PAT;
- ;
- break;}
-case 305:
-#line 3433 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *PTy = yyvsp[0].ValueVal.V->getType();
+ delete (yyvsp[-4].TypeVal).PAT;
+ delete (yyvsp[-1].ValueList);
+ ;}
+ break;
+
+ case 297:
+#line 3391 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.InstVal) = (yyvsp[0].InstVal);
+ ;}
+ break;
+
+ case 298:
+#line 3399 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValueList) = (yyvsp[0].ValueList); ;}
+ break;
+
+ case 299:
+#line 3400 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValueList) = new std::vector<ValueInfo>(); ;}
+ break;
+
+ case 300:
+#line 3404 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = true; ;}
+ break;
+
+ case 301:
+#line 3405 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = false; ;}
+ break;
+
+ case 302:
+#line 3409 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-1].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[-1].TypeVal).S;
+ (yyval.InstVal).I = new MallocInst(Ty, 0, (yyvsp[0].UIntVal));
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 303:
+#line 3415 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-4].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[-4].TypeVal).S;
+ (yyval.InstVal).I = new MallocInst(Ty, getVal((yyvsp[-2].PrimType).T, (yyvsp[-1].ValIDVal)), (yyvsp[0].UIntVal));
+ delete (yyvsp[-4].TypeVal).PAT;
+ ;}
+ break;
+
+ case 304:
+#line 3421 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-1].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[-1].TypeVal).S;
+ (yyval.InstVal).I = new AllocaInst(Ty, 0, (yyvsp[0].UIntVal));
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 305:
+#line 3427 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[-4].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[-4].TypeVal).S;
+ (yyval.InstVal).I = new AllocaInst(Ty, getVal((yyvsp[-2].PrimType).T, (yyvsp[-1].ValIDVal)), (yyvsp[0].UIntVal));
+ delete (yyvsp[-4].TypeVal).PAT;
+ ;}
+ break;
+
+ case 306:
+#line 3433 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *PTy = (yyvsp[0].ValueVal).V->getType();
if (!isa<PointerType>(PTy))
error("Trying to free nonpointer type '" + PTy->getDescription() + "'");
- yyval.InstVal.I = new FreeInst(yyvsp[0].ValueVal.V);
- yyval.InstVal.S = Signless;
- ;
- break;}
-case 306:
-#line 3440 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-1].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-1].TypeVal.S;
+ (yyval.InstVal).I = new FreeInst((yyvsp[0].ValueVal).V);
+ (yyval.InstVal).S = Signless;
+ ;}
+ break;
+
+ case 307:
+#line 3440 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[-1].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[-1].TypeVal).S;
if (!isa<PointerType>(Ty))
error("Can't load from nonpointer type: " + Ty->getDescription());
if (!cast<PointerType>(Ty)->getElementType()->isFirstClassType())
error("Can't load from pointer of non-first-class type: " +
Ty->getDescription());
- Value* tmpVal = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = new LoadInst(tmpVal, "", yyvsp[-3].BoolVal);
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 307:
-#line 3452 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const PointerType *PTy = dyn_cast<PointerType>(yyvsp[-1].TypeVal.PAT->get());
+ Value* tmpVal = getVal(Ty, (yyvsp[0].ValIDVal));
+ (yyval.InstVal).I = new LoadInst(tmpVal, "", (yyvsp[-3].BoolVal));
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 308:
+#line 3452 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const PointerType *PTy = dyn_cast<PointerType>((yyvsp[-1].TypeVal).PAT->get());
if (!PTy)
error("Can't store to a nonpointer type: " +
- yyvsp[-1].TypeVal.PAT->get()->getDescription());
+ (yyvsp[-1].TypeVal).PAT->get()->getDescription());
const Type *ElTy = PTy->getElementType();
- Value *StoreVal = yyvsp[-3].ValueVal.V;
- Value* tmpVal = getVal(PTy, yyvsp[0].ValIDVal);
- if (ElTy != yyvsp[-3].ValueVal.V->getType()) {
- StoreVal = handleSRetFuncTypeMerge(yyvsp[-3].ValueVal.V, ElTy);
+ Value *StoreVal = (yyvsp[-3].ValueVal).V;
+ Value* tmpVal = getVal(PTy, (yyvsp[0].ValIDVal));
+ if (ElTy != (yyvsp[-3].ValueVal).V->getType()) {
+ StoreVal = handleSRetFuncTypeMerge((yyvsp[-3].ValueVal).V, ElTy);
if (!StoreVal)
- error("Can't store '" + yyvsp[-3].ValueVal.V->getType()->getDescription() +
+ error("Can't store '" + (yyvsp[-3].ValueVal).V->getType()->getDescription() +
"' into space of type '" + ElTy->getDescription() + "'");
else {
PTy = PointerType::get(StoreVal->getType());
@@ -5317,251 +6192,304 @@ case 307:
tmpVal = new BitCastInst(tmpVal, PTy, "upgrd.cast", CurBB);
}
}
- yyval.InstVal.I = new StoreInst(StoreVal, tmpVal, yyvsp[-5].BoolVal);
- yyval.InstVal.S = Signless;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 308:
-#line 3477 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-2].TypeVal.PAT->get();
+ (yyval.InstVal).I = new StoreInst(StoreVal, tmpVal, (yyvsp[-5].BoolVal));
+ (yyval.InstVal).S = Signless;
+ delete (yyvsp[-1].TypeVal).PAT;
+ ;}
+ break;
+
+ case 309:
+#line 3477 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[-2].TypeVal).PAT->get();
if (!isa<PointerType>(Ty))
error("getelementptr insn requires pointer operand");
std::vector<Value*> VIndices;
- upgradeGEPIndices(Ty, yyvsp[0].ValueList, VIndices);
-
- Value* tmpVal = getVal(Ty, yyvsp[-1].ValIDVal);
- yyval.InstVal.I = new GetElementPtrInst(tmpVal, &VIndices[0], VIndices.size());
- yyval.InstVal.S = Signless;
- delete yyvsp[-2].TypeVal.PAT;
- delete yyvsp[0].ValueList;
- ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/share/bison.simple"
+ upgradeGEPIndices(Ty, (yyvsp[0].ValueList), VIndices);
+
+ Value* tmpVal = getVal(Ty, (yyvsp[-1].ValIDVal));
+ (yyval.InstVal).I = new GetElementPtrInst(tmpVal, &VIndices[0], VIndices.size());
+ (yyval.InstVal).S = Signless;
+ delete (yyvsp[-2].TypeVal).PAT;
+ delete (yyvsp[0].ValueList);
+ ;}
+ break;
+
+
+ default: break;
+ }
+
+/* Line 1126 of yacc.c. */
+#line 6225 "UpgradeParser.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
+
+ YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
yyn = yyr1[yyn];
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
- yystate = yydefgoto[yyn - YYNTBASE];
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
-yyerrlab: /* here on detecting error */
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
{
++yynerrs;
-
-#ifdef YYERROR_VERBOSE
+#if YYERROR_VERBOSE
yyn = yypact[yystate];
- if (yyn > YYFLAG && yyn < YYLAST)
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
{
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) malloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
- if (count < 5)
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
{
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
}
- yyerror(msg);
- free(msg);
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
}
else
- yyerror ("parse error; also virtual memory exceeded");
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
+ yyerror (YY_("syntax error"));
}
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
+
if (yyerrstatus == 3)
{
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
+ /* If just tried and failed to reuse look-ahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding", yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token
- after shifting the error token. */
+ /* Else will try to reuse look-ahead token after shifting the error
+ token. */
+ goto yyerrlab1;
- yyerrstatus = 3; /* Each real token shifted decrements this */
- goto yyerrhandle;
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
-yyerrdefault: /* current state does not do anything special for the error token. */
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (0)
+ goto yyerrorlab;
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
-yyerrpop: /* pop the current state because it cannot handle the error token */
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
-#if YYDEBUG != 0
- if (yydebug)
+ for (;;)
{
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
}
- else if (yyn == 0)
- goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
*++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
- yyacceptlab:
- /* YYACCEPT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
#endif
- }
- return 0;
- yyabortlab:
- /* YYABORT comes here. */
- if (yyfree_stacks)
+yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
{
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
}
- return 1;
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
}
-#line 3493 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
+
+
+#line 3493 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
int yyerror(const char *ErrorMsg) {
@@ -5594,3 +6522,4 @@ void error(const std::string& ErrorMsg, int LineNo) {
yyerror(ErrorMsg.c_str());
}
+
diff --git a/tools/llvm-upgrade/UpgradeParser.h.cvs b/tools/llvm-upgrade/UpgradeParser.h.cvs
index 45d3326..f182a67 100644
--- a/tools/llvm-upgrade/UpgradeParser.h.cvs
+++ b/tools/llvm-upgrade/UpgradeParser.h.cvs
@@ -1,4 +1,342 @@
-typedef union {
+/* A Bison parser, made by GNU Bison 2.1. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ 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. */
+
+/* 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,
+ DLLIMPORT = 300,
+ DLLEXPORT = 301,
+ EXTERN_WEAK = 302,
+ OPAQUE = 303,
+ NOT = 304,
+ EXTERNAL = 305,
+ TARGET = 306,
+ TRIPLE = 307,
+ ENDIAN = 308,
+ POINTERSIZE = 309,
+ LITTLE = 310,
+ BIG = 311,
+ ALIGN = 312,
+ DEPLIBS = 313,
+ CALL = 314,
+ TAIL = 315,
+ ASM_TOK = 316,
+ MODULE = 317,
+ SIDEEFFECT = 318,
+ CC_TOK = 319,
+ CCC_TOK = 320,
+ CSRETCC_TOK = 321,
+ FASTCC_TOK = 322,
+ COLDCC_TOK = 323,
+ X86_STDCALLCC_TOK = 324,
+ X86_FASTCALLCC_TOK = 325,
+ DATALAYOUT = 326,
+ RET = 327,
+ BR = 328,
+ SWITCH = 329,
+ INVOKE = 330,
+ UNREACHABLE = 331,
+ UNWIND = 332,
+ EXCEPT = 333,
+ ADD = 334,
+ SUB = 335,
+ MUL = 336,
+ DIV = 337,
+ UDIV = 338,
+ SDIV = 339,
+ FDIV = 340,
+ REM = 341,
+ UREM = 342,
+ SREM = 343,
+ FREM = 344,
+ AND = 345,
+ OR = 346,
+ XOR = 347,
+ SHL = 348,
+ SHR = 349,
+ ASHR = 350,
+ LSHR = 351,
+ SETLE = 352,
+ SETGE = 353,
+ SETLT = 354,
+ SETGT = 355,
+ SETEQ = 356,
+ SETNE = 357,
+ ICMP = 358,
+ FCMP = 359,
+ MALLOC = 360,
+ ALLOCA = 361,
+ FREE = 362,
+ LOAD = 363,
+ STORE = 364,
+ GETELEMENTPTR = 365,
+ PHI_TOK = 366,
+ SELECT = 367,
+ VAARG = 368,
+ EXTRACTELEMENT = 369,
+ INSERTELEMENT = 370,
+ SHUFFLEVECTOR = 371,
+ VAARG_old = 372,
+ VANEXT_old = 373,
+ EQ = 374,
+ NE = 375,
+ SLT = 376,
+ SGT = 377,
+ SLE = 378,
+ SGE = 379,
+ ULT = 380,
+ UGT = 381,
+ ULE = 382,
+ UGE = 383,
+ OEQ = 384,
+ ONE = 385,
+ OLT = 386,
+ OGT = 387,
+ OLE = 388,
+ OGE = 389,
+ ORD = 390,
+ UNO = 391,
+ UEQ = 392,
+ UNE = 393,
+ CAST = 394,
+ TRUNC = 395,
+ ZEXT = 396,
+ SEXT = 397,
+ FPTRUNC = 398,
+ FPEXT = 399,
+ FPTOUI = 400,
+ FPTOSI = 401,
+ UITOFP = 402,
+ SITOFP = 403,
+ PTRTOINT = 404,
+ INTTOPTR = 405,
+ BITCAST = 406
+ };
+#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 DLLIMPORT 300
+#define DLLEXPORT 301
+#define EXTERN_WEAK 302
+#define OPAQUE 303
+#define NOT 304
+#define EXTERNAL 305
+#define TARGET 306
+#define TRIPLE 307
+#define ENDIAN 308
+#define POINTERSIZE 309
+#define LITTLE 310
+#define BIG 311
+#define ALIGN 312
+#define DEPLIBS 313
+#define CALL 314
+#define TAIL 315
+#define ASM_TOK 316
+#define MODULE 317
+#define SIDEEFFECT 318
+#define CC_TOK 319
+#define CCC_TOK 320
+#define CSRETCC_TOK 321
+#define FASTCC_TOK 322
+#define COLDCC_TOK 323
+#define X86_STDCALLCC_TOK 324
+#define X86_FASTCALLCC_TOK 325
+#define DATALAYOUT 326
+#define RET 327
+#define BR 328
+#define SWITCH 329
+#define INVOKE 330
+#define UNREACHABLE 331
+#define UNWIND 332
+#define EXCEPT 333
+#define ADD 334
+#define SUB 335
+#define MUL 336
+#define DIV 337
+#define UDIV 338
+#define SDIV 339
+#define FDIV 340
+#define REM 341
+#define UREM 342
+#define SREM 343
+#define FREM 344
+#define AND 345
+#define OR 346
+#define XOR 347
+#define SHL 348
+#define SHR 349
+#define ASHR 350
+#define LSHR 351
+#define SETLE 352
+#define SETGE 353
+#define SETLT 354
+#define SETGT 355
+#define SETEQ 356
+#define SETNE 357
+#define ICMP 358
+#define FCMP 359
+#define MALLOC 360
+#define ALLOCA 361
+#define FREE 362
+#define LOAD 363
+#define STORE 364
+#define GETELEMENTPTR 365
+#define PHI_TOK 366
+#define SELECT 367
+#define VAARG 368
+#define EXTRACTELEMENT 369
+#define INSERTELEMENT 370
+#define SHUFFLEVECTOR 371
+#define VAARG_old 372
+#define VANEXT_old 373
+#define EQ 374
+#define NE 375
+#define SLT 376
+#define SGT 377
+#define SLE 378
+#define SGE 379
+#define ULT 380
+#define UGT 381
+#define ULE 382
+#define UGE 383
+#define OEQ 384
+#define ONE 385
+#define OLT 386
+#define OGT 387
+#define OLE 388
+#define OGE 389
+#define ORD 390
+#define UNO 391
+#define UEQ 392
+#define UNE 393
+#define CAST 394
+#define TRUNC 395
+#define ZEXT 396
+#define SEXT 397
+#define FPTRUNC 398
+#define FPEXT 399
+#define FPTOUI 400
+#define FPTOSI 401
+#define UITOFP 402
+#define SITOFP 403
+#define PTRTOINT 404
+#define INTTOPTR 405
+#define BITCAST 406
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 1454 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
std::pair<llvm::PATypeInfo, char*> *ArgVal;
@@ -39,155 +377,14 @@ typedef union {
llvm::FCmpInst::Predicate FPred;
llvm::Module::Endianness Endianness;
} YYSTYPE;
-#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 DLLIMPORT 299
-#define DLLEXPORT 300
-#define EXTERN_WEAK 301
-#define OPAQUE 302
-#define NOT 303
-#define EXTERNAL 304
-#define TARGET 305
-#define TRIPLE 306
-#define ENDIAN 307
-#define POINTERSIZE 308
-#define LITTLE 309
-#define BIG 310
-#define ALIGN 311
-#define DEPLIBS 312
-#define CALL 313
-#define TAIL 314
-#define ASM_TOK 315
-#define MODULE 316
-#define SIDEEFFECT 317
-#define CC_TOK 318
-#define CCC_TOK 319
-#define CSRETCC_TOK 320
-#define FASTCC_TOK 321
-#define COLDCC_TOK 322
-#define X86_STDCALLCC_TOK 323
-#define X86_FASTCALLCC_TOK 324
-#define DATALAYOUT 325
-#define RET 326
-#define BR 327
-#define SWITCH 328
-#define INVOKE 329
-#define UNREACHABLE 330
-#define UNWIND 331
-#define EXCEPT 332
-#define ADD 333
-#define SUB 334
-#define MUL 335
-#define DIV 336
-#define UDIV 337
-#define SDIV 338
-#define FDIV 339
-#define REM 340
-#define UREM 341
-#define SREM 342
-#define FREM 343
-#define AND 344
-#define OR 345
-#define XOR 346
-#define SHL 347
-#define SHR 348
-#define ASHR 349
-#define LSHR 350
-#define SETLE 351
-#define SETGE 352
-#define SETLT 353
-#define SETGT 354
-#define SETEQ 355
-#define SETNE 356
-#define ICMP 357
-#define FCMP 358
-#define MALLOC 359
-#define ALLOCA 360
-#define FREE 361
-#define LOAD 362
-#define STORE 363
-#define GETELEMENTPTR 364
-#define PHI_TOK 365
-#define SELECT 366
-#define VAARG 367
-#define EXTRACTELEMENT 368
-#define INSERTELEMENT 369
-#define SHUFFLEVECTOR 370
-#define VAARG_old 371
-#define VANEXT_old 372
-#define EQ 373
-#define NE 374
-#define SLT 375
-#define SGT 376
-#define SLE 377
-#define SGE 378
-#define ULT 379
-#define UGT 380
-#define ULE 381
-#define UGE 382
-#define OEQ 383
-#define ONE 384
-#define OLT 385
-#define OGT 386
-#define OLE 387
-#define OGE 388
-#define ORD 389
-#define UNO 390
-#define UEQ 391
-#define UNE 392
-#define CAST 393
-#define TRUNC 394
-#define ZEXT 395
-#define SEXT 396
-#define FPTRUNC 397
-#define FPEXT 398
-#define FPTOUI 399
-#define FPTOSI 400
-#define UITOFP 401
-#define SITOFP 402
-#define PTRTOINT 403
-#define INTTOPTR 404
-#define BITCAST 405
-
+/* Line 1447 of yacc.c. */
+#line 382 "UpgradeParser.tab.h"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
extern YYSTYPE Upgradelval;
+
+
+
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y
index fdcff5b..df472cc 100644
--- a/tools/llvm-upgrade/UpgradeParser.y
+++ b/tools/llvm-upgrade/UpgradeParser.y
@@ -998,7 +998,7 @@ getBinaryOp(BinaryOps op, const Type *Ty, Signedness Sign) {
// This is an obsolete instruction so we must upgrade it based on the
// types of its operands.
bool isFP = Ty->isFloatingPoint();
- if (const PackedType* PTy = dyn_cast<PackedType>(Ty))
+ if (const VectorType* PTy = dyn_cast<VectorType>(Ty))
// If its a packed type we want to use the element type
isFP = PTy->getElementType()->isFloatingPoint();
if (isFP)
@@ -1014,7 +1014,7 @@ getBinaryOp(BinaryOps op, const Type *Ty, Signedness Sign) {
// This is an obsolete instruction so we must upgrade it based on the
// types of its operands.
bool isFP = Ty->isFloatingPoint();
- if (const PackedType* PTy = dyn_cast<PackedType>(Ty))
+ if (const VectorType* PTy = dyn_cast<VectorType>(Ty))
// If its a packed type we want to use the element type
isFP = PTy->getElementType()->isFloatingPoint();
// Select correct opcode
@@ -1846,10 +1846,10 @@ UpRTypes
if ((unsigned)$2 != $2)
error("Unsigned result not equal to signed result");
if (!(ElemTy->isInteger() || ElemTy->isFloatingPoint()))
- error("Elements of a PackedType must be integer or floating point");
+ error("Elements of a VectorType must be integer or floating point");
if (!isPowerOf2_32($2))
- error("PackedType length should be a power of 2");
- $$.PAT = new PATypeHolder(HandleUpRefs(PackedType::get(ElemTy,
+ error("VectorType length should be a power of 2");
+ $$.PAT = new PATypeHolder(HandleUpRefs(VectorType::get(ElemTy,
(unsigned)$2)));
$$.S = $4.S;
delete $4.PAT;
@@ -1999,7 +1999,7 @@ ConstVal
delete $1.PAT;
}
| Types '<' ConstVector '>' { // Nonempty unsized arr
- const PackedType *PTy = dyn_cast<PackedType>($1.PAT->get());
+ const VectorType *PTy = dyn_cast<VectorType>($1.PAT->get());
if (PTy == 0)
error("Cannot make packed constant with type: '" +
$1.PAT->get()->getDescription() + "'");
@@ -2021,7 +2021,7 @@ ConstVal
ValTy->getDescription() + "'");
Elems.push_back(C);
}
- $$.C = ConstantPacked::get(PTy, Elems);
+ $$.C = ConstantVector::get(PTy, Elems);
$$.S = $1.S;
delete $1.PAT;
delete $3;
@@ -2280,8 +2280,8 @@ ConstExpr
if (Ty != $5.C->getType())
error("Logical operator types must match");
if (!Ty->isInteger()) {
- if (!isa<PackedType>(Ty) ||
- !cast<PackedType>(Ty)->getElementType()->isInteger())
+ if (!isa<VectorType>(Ty) ||
+ !cast<VectorType>(Ty)->getElementType()->isInteger())
error("Logical operator requires integer operands");
}
Instruction::BinaryOps Opcode = getBinaryOp($1, Ty, $3.S);
@@ -2802,9 +2802,9 @@ ConstValueRef
| '<' ConstVector '>' { // Nonempty unsized packed vector
const Type *ETy = (*$2)[0].C->getType();
int NumElements = $2->size();
- PackedType* pt = PackedType::get(ETy, NumElements);
+ VectorType* pt = VectorType::get(ETy, NumElements);
PATypeHolder* PTy = new PATypeHolder(
- HandleUpRefs(PackedType::get(ETy, NumElements)));
+ HandleUpRefs(VectorType::get(ETy, NumElements)));
// Verify all elements are correct type!
std::vector<Constant*> Elems;
@@ -2817,7 +2817,7 @@ ConstValueRef
CTy->getDescription() + "'");
Elems.push_back(C);
}
- $$ = ValID::create(ConstantPacked::get(pt, Elems));
+ $$ = ValID::create(ConstantVector::get(pt, Elems));
delete PTy; delete $2;
}
| ConstExpr {
@@ -3108,9 +3108,9 @@ OptTailCall
InstVal
: ArithmeticOps Types ValueRef ',' ValueRef {
const Type* Ty = $2.PAT->get();
- if (!Ty->isInteger() && !Ty->isFloatingPoint() && !isa<PackedType>(Ty))
+ if (!Ty->isInteger() && !Ty->isFloatingPoint() && !isa<VectorType>(Ty))
error("Arithmetic operator requires integer, FP, or packed operands");
- if (isa<PackedType>(Ty) &&
+ if (isa<VectorType>(Ty) &&
($1 == URemOp || $1 == SRemOp || $1 == FRemOp || $1 == RemOp))
error("Remainder not supported on packed types");
// Upgrade the opcode from obsolete versions before we do anything with it.
@@ -3126,8 +3126,8 @@ InstVal
| LogicalOps Types ValueRef ',' ValueRef {
const Type *Ty = $2.PAT->get();
if (!Ty->isInteger()) {
- if (!isa<PackedType>(Ty) ||
- !cast<PackedType>(Ty)->getElementType()->isInteger())
+ if (!isa<VectorType>(Ty) ||
+ !cast<VectorType>(Ty)->getElementType()->isInteger())
error("Logical operator requires integral operands");
}
Instruction::BinaryOps Opcode = getBinaryOp($1, Ty, $2.S);
@@ -3141,8 +3141,8 @@ InstVal
}
| SetCondOps Types ValueRef ',' ValueRef {
const Type* Ty = $2.PAT->get();
- if(isa<PackedType>(Ty))
- error("PackedTypes currently not supported in setcc instructions");
+ if(isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in setcc instructions");
unsigned short pred;
Instruction::OtherOps Opcode = getCompareOp($1, pred, Ty, $2.S);
Value* tmpVal1 = getVal(Ty, $3);
@@ -3155,8 +3155,8 @@ InstVal
}
| ICMP IPredicates Types ValueRef ',' ValueRef {
const Type *Ty = $3.PAT->get();
- if (isa<PackedType>(Ty))
- error("PackedTypes currently not supported in icmp instructions");
+ if (isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in icmp instructions");
else if (!Ty->isInteger() && !isa<PointerType>(Ty))
error("icmp requires integer or pointer typed operands");
Value* tmpVal1 = getVal(Ty, $4);
@@ -3167,8 +3167,8 @@ InstVal
}
| FCMP FPredicates Types ValueRef ',' ValueRef {
const Type *Ty = $3.PAT->get();
- if (isa<PackedType>(Ty))
- error("PackedTypes currently not supported in fcmp instructions");
+ if (isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in fcmp instructions");
else if (!Ty->isFloatingPoint())
error("fcmp instruction requires floating point operands");
Value* tmpVal1 = getVal(Ty, $4);
diff --git a/tools/llvm-upgrade/UpgradeParser.y.cvs b/tools/llvm-upgrade/UpgradeParser.y.cvs
index fdcff5b..df472cc 100644
--- a/tools/llvm-upgrade/UpgradeParser.y.cvs
+++ b/tools/llvm-upgrade/UpgradeParser.y.cvs
@@ -998,7 +998,7 @@ getBinaryOp(BinaryOps op, const Type *Ty, Signedness Sign) {
// This is an obsolete instruction so we must upgrade it based on the
// types of its operands.
bool isFP = Ty->isFloatingPoint();
- if (const PackedType* PTy = dyn_cast<PackedType>(Ty))
+ if (const VectorType* PTy = dyn_cast<VectorType>(Ty))
// If its a packed type we want to use the element type
isFP = PTy->getElementType()->isFloatingPoint();
if (isFP)
@@ -1014,7 +1014,7 @@ getBinaryOp(BinaryOps op, const Type *Ty, Signedness Sign) {
// This is an obsolete instruction so we must upgrade it based on the
// types of its operands.
bool isFP = Ty->isFloatingPoint();
- if (const PackedType* PTy = dyn_cast<PackedType>(Ty))
+ if (const VectorType* PTy = dyn_cast<VectorType>(Ty))
// If its a packed type we want to use the element type
isFP = PTy->getElementType()->isFloatingPoint();
// Select correct opcode
@@ -1846,10 +1846,10 @@ UpRTypes
if ((unsigned)$2 != $2)
error("Unsigned result not equal to signed result");
if (!(ElemTy->isInteger() || ElemTy->isFloatingPoint()))
- error("Elements of a PackedType must be integer or floating point");
+ error("Elements of a VectorType must be integer or floating point");
if (!isPowerOf2_32($2))
- error("PackedType length should be a power of 2");
- $$.PAT = new PATypeHolder(HandleUpRefs(PackedType::get(ElemTy,
+ error("VectorType length should be a power of 2");
+ $$.PAT = new PATypeHolder(HandleUpRefs(VectorType::get(ElemTy,
(unsigned)$2)));
$$.S = $4.S;
delete $4.PAT;
@@ -1999,7 +1999,7 @@ ConstVal
delete $1.PAT;
}
| Types '<' ConstVector '>' { // Nonempty unsized arr
- const PackedType *PTy = dyn_cast<PackedType>($1.PAT->get());
+ const VectorType *PTy = dyn_cast<VectorType>($1.PAT->get());
if (PTy == 0)
error("Cannot make packed constant with type: '" +
$1.PAT->get()->getDescription() + "'");
@@ -2021,7 +2021,7 @@ ConstVal
ValTy->getDescription() + "'");
Elems.push_back(C);
}
- $$.C = ConstantPacked::get(PTy, Elems);
+ $$.C = ConstantVector::get(PTy, Elems);
$$.S = $1.S;
delete $1.PAT;
delete $3;
@@ -2280,8 +2280,8 @@ ConstExpr
if (Ty != $5.C->getType())
error("Logical operator types must match");
if (!Ty->isInteger()) {
- if (!isa<PackedType>(Ty) ||
- !cast<PackedType>(Ty)->getElementType()->isInteger())
+ if (!isa<VectorType>(Ty) ||
+ !cast<VectorType>(Ty)->getElementType()->isInteger())
error("Logical operator requires integer operands");
}
Instruction::BinaryOps Opcode = getBinaryOp($1, Ty, $3.S);
@@ -2802,9 +2802,9 @@ ConstValueRef
| '<' ConstVector '>' { // Nonempty unsized packed vector
const Type *ETy = (*$2)[0].C->getType();
int NumElements = $2->size();
- PackedType* pt = PackedType::get(ETy, NumElements);
+ VectorType* pt = VectorType::get(ETy, NumElements);
PATypeHolder* PTy = new PATypeHolder(
- HandleUpRefs(PackedType::get(ETy, NumElements)));
+ HandleUpRefs(VectorType::get(ETy, NumElements)));
// Verify all elements are correct type!
std::vector<Constant*> Elems;
@@ -2817,7 +2817,7 @@ ConstValueRef
CTy->getDescription() + "'");
Elems.push_back(C);
}
- $$ = ValID::create(ConstantPacked::get(pt, Elems));
+ $$ = ValID::create(ConstantVector::get(pt, Elems));
delete PTy; delete $2;
}
| ConstExpr {
@@ -3108,9 +3108,9 @@ OptTailCall
InstVal
: ArithmeticOps Types ValueRef ',' ValueRef {
const Type* Ty = $2.PAT->get();
- if (!Ty->isInteger() && !Ty->isFloatingPoint() && !isa<PackedType>(Ty))
+ if (!Ty->isInteger() && !Ty->isFloatingPoint() && !isa<VectorType>(Ty))
error("Arithmetic operator requires integer, FP, or packed operands");
- if (isa<PackedType>(Ty) &&
+ if (isa<VectorType>(Ty) &&
($1 == URemOp || $1 == SRemOp || $1 == FRemOp || $1 == RemOp))
error("Remainder not supported on packed types");
// Upgrade the opcode from obsolete versions before we do anything with it.
@@ -3126,8 +3126,8 @@ InstVal
| LogicalOps Types ValueRef ',' ValueRef {
const Type *Ty = $2.PAT->get();
if (!Ty->isInteger()) {
- if (!isa<PackedType>(Ty) ||
- !cast<PackedType>(Ty)->getElementType()->isInteger())
+ if (!isa<VectorType>(Ty) ||
+ !cast<VectorType>(Ty)->getElementType()->isInteger())
error("Logical operator requires integral operands");
}
Instruction::BinaryOps Opcode = getBinaryOp($1, Ty, $2.S);
@@ -3141,8 +3141,8 @@ InstVal
}
| SetCondOps Types ValueRef ',' ValueRef {
const Type* Ty = $2.PAT->get();
- if(isa<PackedType>(Ty))
- error("PackedTypes currently not supported in setcc instructions");
+ if(isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in setcc instructions");
unsigned short pred;
Instruction::OtherOps Opcode = getCompareOp($1, pred, Ty, $2.S);
Value* tmpVal1 = getVal(Ty, $3);
@@ -3155,8 +3155,8 @@ InstVal
}
| ICMP IPredicates Types ValueRef ',' ValueRef {
const Type *Ty = $3.PAT->get();
- if (isa<PackedType>(Ty))
- error("PackedTypes currently not supported in icmp instructions");
+ if (isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in icmp instructions");
else if (!Ty->isInteger() && !isa<PointerType>(Ty))
error("icmp requires integer or pointer typed operands");
Value* tmpVal1 = getVal(Ty, $4);
@@ -3167,8 +3167,8 @@ InstVal
}
| FCMP FPredicates Types ValueRef ',' ValueRef {
const Type *Ty = $3.PAT->get();
- if (isa<PackedType>(Ty))
- error("PackedTypes currently not supported in fcmp instructions");
+ if (isa<VectorType>(Ty))
+ error("VectorTypes currently not supported in fcmp instructions");
else if (!Ty->isFloatingPoint())
error("fcmp instruction requires floating point operands");
Value* tmpVal1 = getVal(Ty, $4);
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp
index 70f5626..05a85cf 100644
--- a/tools/llvm2cpp/CppWriter.cpp
+++ b/tools/llvm2cpp/CppWriter.cpp
@@ -174,7 +174,7 @@ getTypePrefix(const Type* Ty ) {
case Type::StructTyID: return "struct_";
case Type::ArrayTyID: return "array_";
case Type::PointerTyID: return "ptr_";
- case Type::PackedTyID: return "packed_";
+ case Type::VectorTyID: return "packed_";
case Type::OpaqueTyID: return "opaque_";
default: return "other_";
}
@@ -338,7 +338,7 @@ CppWriter::getCppName(const Type* Ty)
case Type::ArrayTyID: prefix = "ArrayTy_"; break;
case Type::PointerTyID: prefix = "PointerTy_"; break;
case Type::OpaqueTyID: prefix = "OpaqueTy_"; break;
- case Type::PackedTyID: prefix = "PackedTy_"; break;
+ case Type::VectorTyID: prefix = "PackedTy_"; break;
default: prefix = "OtherTy_"; break; // prevent breakage
}
@@ -512,12 +512,12 @@ CppWriter::printTypeInternal(const Type* Ty) {
nl(Out);
break;
}
- case Type::PackedTyID: {
- const PackedType* PT = cast<PackedType>(Ty);
+ case Type::VectorTyID: {
+ const VectorType* PT = cast<VectorType>(Ty);
const Type* ET = PT->getElementType();
bool isForward = printTypeInternal(ET);
std::string elemName(getCppName(ET));
- Out << "PackedType* " << typeName << " = PackedType::get("
+ Out << "VectorType* " << typeName << " = VectorType::get("
<< elemName << (isForward ? "_fwd" : "")
<< ", " << utostr(PT->getNumElements()) << ");";
nl(Out);
@@ -560,7 +560,7 @@ CppWriter::printTypeInternal(const Type* Ty) {
case Type::FunctionTyID: Out << "FunctionType"; break;
case Type::ArrayTyID: Out << "ArrayType"; break;
case Type::StructTyID: Out << "StructType"; break;
- case Type::PackedTyID: Out << "PackedType"; break;
+ case Type::VectorTyID: Out << "VectorType"; break;
case Type::PointerTyID: Out << "PointerType"; break;
case Type::OpaqueTyID: Out << "OpaqueType"; break;
default: Out << "NoSuchDerivedType"; break;
@@ -711,7 +711,7 @@ void CppWriter::printConstant(const Constant *CV) {
}
Out << "Constant* " << constName << " = ConstantStruct::get("
<< typeName << ", " << constName << "_fields);";
- } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(CV)) {
+ } else if (const ConstantVector *CP = dyn_cast<ConstantVector>(CV)) {
Out << "std::vector<Constant*> " << constName << "_elems;";
nl(Out);
unsigned N = CP->getNumOperands();
@@ -721,7 +721,7 @@ void CppWriter::printConstant(const Constant *CV) {
<< getCppName(CP->getOperand(i)) << ");";
nl(Out);
}
- Out << "Constant* " << constName << " = ConstantPacked::get("
+ Out << "Constant* " << constName << " = ConstantVector::get("
<< typeName << ", " << constName << "_elems);";
} else if (isa<UndefValue>(CV)) {
Out << "UndefValue* " << constName << " = UndefValue::get("
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index 1a70b25..214f310 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -120,7 +120,7 @@ static bool EmitTypeVerify(std::ostream &OS, Record *ArgType) {
OS << ArgType->getValueAsInt("Width") << ", ";
// If this is a packed type, check that the subtype and size are correct.
- else if (ArgType->isSubClassOf("LLVMPackedType")) {
+ else if (ArgType->isSubClassOf("LLVMVectorType")) {
EmitTypeVerify(OS, ArgType->getValueAsDef("ElTy"));
OS << ArgType->getValueAsInt("NumElts") << ", ";
}
@@ -131,8 +131,8 @@ static bool EmitTypeVerify(std::ostream &OS, Record *ArgType) {
static void EmitTypeGenerate(std::ostream &OS, Record *ArgType) {
if (ArgType->isSubClassOf("LLVMIntegerType")) {
OS << "IntegerType::get(" << ArgType->getValueAsInt("Width") << ")";
- } else if (ArgType->isSubClassOf("LLVMPackedType")) {
- OS << "PackedType::get(";
+ } else if (ArgType->isSubClassOf("LLVMVectorType")) {
+ OS << "VectorType::get(";
EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"));
OS << ", " << ArgType->getValueAsInt("NumElts") << ")";
} else if (ArgType->isSubClassOf("LLVMPointerType")) {