llvm.org GIT mirror llvm / ef9b9a7
For PR411: This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
74 changed file(s) with 1592 addition(s) and 2363 deletion(s). Raw diff Collapse all Expand all
180180 virtual void handleCompactionTableEnd() {}
181181
182182 /// @brief Handle start of a symbol table
183 virtual void handleSymbolTableBegin(
184 Function* Func, ///< The function to which the ST belongs
185 SymbolTable* ST ///< The symbol table being filled
186 ) {}
187
188 /// @brief Handle start of a symbol table plane
189 virtual void handleSymbolTablePlane(
190 unsigned TySlot, ///< The slotnum of the type plane
191 unsigned NumEntries, ///< Number of entries in the plane
192 const Type* Typ ///< The type of this type plane
183 virtual void handleTypeSymbolTableBegin(
184 TypeSymbolTable* ST ///< The symbol table being filled
185 ) {}
186
187 /// @brief Handle start of a symbol table
188 virtual void handleValueSymbolTableBegin(
189 Function* Func, ///< The function to which the ST belongs or 0 for Mod
190 ValueSymbolTable* ST ///< The symbol table being filled
193191 ) {}
194192
195193 /// @brief Handle a named type in the symbol table
206204 const std::string& name ///< Name of the value.
207205 ) {}
208206
209 /// @brief Handle the end of a symbol table
210 virtual void handleSymbolTableEnd() {}
207 /// @brief Handle the end of a value symbol table
208 virtual void handleTypeSymbolTableEnd() {}
209
210 /// @brief Handle the end of a type symbol table
211 virtual void handleValueSymbolTableEnd() {}
211212
212213 /// @brief Handle the beginning of a function body
213214 virtual void handleFunctionBegin(
232233 unsigned Opcode, ///< Opcode of the instruction
233234 const Type* iType, ///< Instruction type
234235 std::vector& Operands, ///< Vector of slot # operands
236 Instruction *Inst, ///< The resulting instruction
235237 unsigned Length ///< Length of instruction in bc bytes
236238 ) { return false; }
237239
6262 BasicBlockListType BasicBlocks; // The basic blocks
6363 ArgumentListType ArgumentList; // The formal arguments
6464
65 SymbolTable *SymTab;
65 ValueSymbolTable *SymTab;
6666 unsigned CallingConvention;
6767
6868 friend class SymbolTableListTraits;
155155
156156 /// getSymbolTable() - Return the symbol table...
157157 ///
158 inline SymbolTable &getValueSymbolTable() { return *SymTab; }
159 inline const SymbolTable &getValueSymbolTable() const { return *SymTab; }
158 inline ValueSymbolTable &getValueSymbolTable() { return *SymTab; }
159 inline const ValueSymbolTable &getValueSymbolTable() const { return *SymTab; }
160160
161161
162162 //===--------------------------------------------------------------------===//
6363 (void) llvm::createEmitFunctionTablePass();
6464 (void) llvm::createFunctionInliningPass();
6565 (void) llvm::createFunctionProfilerPass();
66 (void) llvm::createFunctionResolvingPass();
6766 (void) llvm::createGCSEPass();
6867 (void) llvm::createGlobalDCEPass();
6968 (void) llvm::createGlobalOptimizerPass();
2222 class GlobalVariable;
2323 class GlobalValueRefMap; // Used by ConstantVals.cpp
2424 class FunctionType;
25 class SymbolTable;
26 class TypeSymbolTable;
2725
2826 template<> struct ilist_traits
2927 : public SymbolTableListTraits {
9088 FunctionListType FunctionList; ///< The Functions in the module
9189 LibraryListType LibraryList; ///< The Libraries needed by the module
9290 std::string GlobalScopeAsm; ///< Inline Asm at global scope.
93 SymbolTable *ValSymTab; ///< Symbol table for values
91 ValueSymbolTable *ValSymTab; ///< Symbol table for values
9492 TypeSymbolTable *TypeSymTab; ///< Symbol table for types
9593 std::string ModuleID; ///< Human readable identifier for the module
9694 std::string TargetTriple; ///< Platform target triple Module compiled on
177175
178176 /// getFunction - Look up the specified function in the module symbol table.
179177 /// If it does not exist, return null.
180 Function *getFunction(const std::string &Name, const FunctionType *Ty);
178 Function *getFunction(const std::string &Name) const;
181179
182180 /// getMainFunction - This function looks up main efficiently. This is such a
183181 /// common case, that it is a method in Module. If main cannot be found, a
184182 /// null pointer is returned.
185 Function *getMainFunction();
183 Function *getMainFunction() { return getFunction("main"); }
186184
187185 /// getNamedFunction - Return the first function in the module with the
188186 /// specified name, of arbitrary type. This method returns null if a function
189187 /// with the specified name is not found.
190 Function *getNamedFunction(const std::string &Name) const;
188 Function *getNamedFunction(const std::string &Name) const {
189 return getFunction(Name);
190 }
191191
192192 /// @}
193193 /// @name Global Variable Accessors
199199 /// the top-level PointerType, which represents the address of the global.
200200 /// If AllowInternal is set to true, this function will return types that
201201 /// have InternalLinkage. By default, these types are not returned.
202 GlobalVariable *getGlobalVariable(const std::string &Name, const Type *Ty,
203 bool AllowInternal = false);
202 GlobalVariable *getGlobalVariable(const std::string &Name,
203 bool AllowInternal = false) const;
204204
205205 /// getNamedGlobal - Return the first global variable in the module with the
206206 /// specified name, of arbitrary type. This method returns null if a global
207207 /// with the specified name is not found.
208 GlobalVariable *getNamedGlobal(const std::string &Name) const;
208 GlobalVariable *getNamedGlobal(const std::string &Name) const {
209 return getGlobalVariable(Name, true);
210 }
209211
210212 /// @}
211213 /// @name Type Accessors
237239 /// Get the Module's list of functions.
238240 FunctionListType &getFunctionList() { return FunctionList; }
239241 /// Get the symbol table of global variable and function identifiers
240 const SymbolTable &getValueSymbolTable() const { return *ValSymTab; }
242 const ValueSymbolTable &getValueSymbolTable() const { return *ValSymTab; }
241243 /// Get the Module's symbol table of global variable and function identifiers.
242 SymbolTable &getValueSymbolTable() { return *ValSymTab; }
244 ValueSymbolTable &getValueSymbolTable() { return *ValSymTab; }
243245 /// Get the symbol table of types
244246 const TypeSymbolTable &getTypeSymbolTable() const { return *TypeSymTab; }
245247 /// Get the Module's symbol table of types
+0
-257
include/llvm/SymbolTable.h less more
None //===-- llvm/SymbolTable.h - Implement a type plane'd symtab ----*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file was developed by the LLVM research group and re-written by Reid
5 // Spencer. It is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the main symbol table for LLVM.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_SYMBOL_TABLE_H
15 #define LLVM_SYMBOL_TABLE_H
16
17 #include "llvm/Value.h"
18 #include "llvm/Support/DataTypes.h"
19 #include
20
21 namespace llvm {
22
23 /// This class provides a symbol table of name/value pairs that is broken
24 /// up by type. For each Type* there is a "plane" of name/value pairs in
25 /// the symbol table. Identical types may have overlapping symbol names as
26 /// long as they are distinct. The SymbolTable also tracks, separately, a
27 /// map of name/type pairs. This allows types to be named. Types are treated
28 /// distinctly from Values.
29 ///
30 /// The SymbolTable provides several utility functions for answering common
31 /// questions about its contents as well as an iterator interface for
32 /// directly iterating over the contents. To reduce confusion, the terms
33 /// "type", "value", and "plane" are used consistently. For example,
34 /// There is a TypeMap typedef that is the mapping of names to Types.
35 /// Similarly there is a ValueMap typedef that is the mapping of
36 /// names to Values. Finally, there is a PlaneMap typedef that is the
37 /// mapping of types to planes of ValueMap. This is the basic structure
38 /// of the symbol table. When you call type_begin() you're asking
39 /// for an iterator at the start of the TypeMap. When you call
40 /// plane_begin(), you're asking for an iterator at the start of
41 /// the PlaneMap. Finally, when you call value_begin(), you're asking
42 /// for an iterator at the start of a ValueMap for a specific type
43 /// plane.
44 class SymbolTable : public AbstractTypeUser {
45
46 /// @name Types
47 /// @{
48 public:
49 /// @brief A mapping of names to values.
50 typedef std::map ValueMap;
51
52 /// @brief An iterator over a ValueMap.
53 typedef ValueMap::iterator value_iterator;
54
55 /// @brief A const_iterator over a ValueMap.
56 typedef ValueMap::const_iterator value_const_iterator;
57
58 /// @brief A mapping of types to names to values (type planes).
59 typedef std::map PlaneMap;
60
61 /// @brief An iterator over the type planes.
62 typedef PlaneMap::iterator plane_iterator;
63
64 /// @brief A const_iterator over the type planes
65 typedef PlaneMap::const_iterator plane_const_iterator;
66
67 /// @}
68 /// @name Constructors
69 /// @{
70 public:
71
72 SymbolTable() : LastUnique(0) {}
73 ~SymbolTable();
74
75 /// @}
76 /// @name Accessors
77 /// @{
78 public:
79
80 /// This method finds the value with the given \p name in the
81 /// type plane \p Ty and returns it. This method will not find any
82 /// Types, only Values. Use lookupType to find Types by name.
83 /// @returns null on failure, otherwise the Value associated with
84 /// the \p name in type plane \p Ty.
85 /// @brief Lookup a named, typed value.
86 Value *lookup(const Type *Ty, const std::string &name) const;
87
88 /// @returns true iff the type map and the type plane are both not
89 /// empty.
90 /// @brief Determine if the symbol table is empty
91 inline bool isEmpty() const { return pmap.empty(); }
92
93 /// Given a base name, return a string that is either equal to it or
94 /// derived from it that does not already occur in the symbol table
95 /// for the specified type.
96 /// @brief Get a name unique to this symbol table
97 std::string getUniqueName(const Type *Ty,
98 const std::string &BaseName) const;
99
100 /// This function can be used from the debugger to display the
101 /// content of the symbol table while debugging.
102 /// @brief Print out symbol table on stderr
103 void dump() const;
104
105 /// @}
106 /// @name Iteration
107 /// @{
108 public:
109
110 /// Get an iterator that starts at the beginning of the type planes.
111 /// The iterator will iterate over the Type/ValueMap pairs in the
112 /// type planes.
113 inline plane_iterator plane_begin() { return pmap.begin(); }
114
115 /// Get a const_iterator that starts at the beginning of the type
116 /// planes. The iterator will iterate over the Type/ValueMap pairs
117 /// in the type planes.
118 inline plane_const_iterator plane_begin() const { return pmap.begin(); }
119
120 /// Get an iterator at the end of the type planes. This serves as
121 /// the marker for end of iteration over the type planes.
122 inline plane_iterator plane_end() { return pmap.end(); }
123
124 /// Get a const_iterator at the end of the type planes. This serves as
125 /// the marker for end of iteration over the type planes.
126 inline plane_const_iterator plane_end() const { return pmap.end(); }
127
128 /// Get an iterator that starts at the beginning of a type plane.
129 /// The iterator will iterate over the name/value pairs in the type plane.
130 /// @note The type plane must already exist before using this.
131 inline value_iterator value_begin(const Type *Typ) {
132 assert(Typ && "Can't get value iterator with null type!");
133 return pmap.find(Typ)->second.begin();
134 }
135
136 /// Get a const_iterator that starts at the beginning of a type plane.
137 /// The iterator will iterate over the name/value pairs in the type plane.
138 /// @note The type plane must already exist before using this.
139 inline value_const_iterator value_begin(const Type *Typ) const {
140 assert(Typ && "Can't get value iterator with null type!");
141 return pmap.find(Typ)->second.begin();
142 }
143
144 /// Get an iterator to the end of a type plane. This serves as the marker
145 /// for end of iteration of the type plane.
146 /// @note The type plane must already exist before using this.
147 inline value_iterator value_end(const Type *Typ) {
148 assert(Typ && "Can't get value iterator with null type!");
149 return pmap.find(Typ)->second.end();
150 }
151
152 /// Get a const_iterator to the end of a type plane. This serves as the
153 /// marker for end of iteration of the type plane.
154 /// @note The type plane must already exist before using this.
155 inline value_const_iterator value_end(const Type *Typ) const {
156 assert(Typ && "Can't get value iterator with null type!");
157 return pmap.find(Typ)->second.end();
158 }
159
160 /// This method returns a plane_const_iterator for iteration over
161 /// the type planes starting at a specific plane, given by \p Ty.
162 /// @brief Find a type plane.
163 inline plane_const_iterator find(const Type* Typ) const {
164 assert(Typ && "Can't find type plane with null type!");
165 return pmap.find(Typ);
166 }
167
168 /// This method returns a plane_iterator for iteration over the
169 /// type planes starting at a specific plane, given by \p Ty.
170 /// @brief Find a type plane.
171 inline plane_iterator find(const Type* Typ) {
172 assert(Typ && "Can't find type plane with null type!");
173 return pmap.find(Typ);
174 }
175
176
177 /// @}
178 /// @name Mutators
179 /// @{
180 public:
181
182 /// This method will strip the symbol table of its names leaving the type and
183 /// values.
184 /// @brief Strip the symbol table.
185 bool strip();
186
187 /// @}
188 /// @name Mutators used by Value::setName and other LLVM internals.
189 /// @{
190 public:
191
192 /// This method adds the provided value \p N to the symbol table. The Value
193 /// must have both a name and a type which are extracted and used to place the
194 /// value in the correct type plane under the value's name.
195 /// @brief Add a named value to the symbol table
196 inline void insert(Value *Val) {
197 assert(Val && "Can't insert null type into symbol table!");
198 assert(Val->hasName() && "Value must be named to go into symbol table!");
199 insertEntry(Val->getName(), Val->getType(), Val);
200 }
201
202 /// This method removes a named value from the symbol table. The type and name
203 /// of the Value are extracted from \p N and used to lookup the Value in the
204 /// correct type plane. If the Value is not in the symbol table, this method
205 /// silently ignores the request.
206 /// @brief Remove a named value from the symbol table.
207 void remove(Value* Val);
208
209 /// changeName - Given a value with a non-empty name, remove its existing
210 /// entry from the symbol table and insert a new one for Name. This is
211 /// equivalent to doing "remove(V), V->Name = Name, insert(V)", but is faster,
212 /// and will not temporarily remove the symbol table plane if V is the last
213 /// value in the symtab with that name (which could invalidate iterators to
214 /// that plane).
215 void changeName(Value *V, const std::string &Name);
216
217 /// @}
218 /// @name Internal Methods
219 /// @{
220 private:
221 /// @brief Insert a value into the symbol table with the specified name.
222 void insertEntry(const std::string &Name, const Type *Ty, Value *V);
223
224 /// This function is called when one of the types in the type plane
225 /// is refined.
226 virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
227
228 /// This function markes a type as being concrete (defined).
229 virtual void typeBecameConcrete(const DerivedType *AbsTy);
230
231 /// @}
232 /// @name Internal Data
233 /// @{
234 private:
235
236 /// This is the main content of the symbol table. It provides
237 /// separate type planes for named values. That is, each named
238 /// value is organized into a separate dictionary based on
239 /// Type. This means that the same name can be used for different
240 /// types without conflict.
241 /// @brief The mapping of types to names to values.
242 PlaneMap pmap;
243
244 /// This value is used to retain the last unique value used
245 /// by getUniqueName to generate unique names.
246 mutable uint32_t LastUnique;
247 /// @}
248
249 };
250
251 } // End llvm namespace
252
253 // vim: sw=2
254
255 #endif
256
8686
8787
8888 //===----------------------------------------------------------------------===//
89 /// FunctionResolvingPass - Go over the functions that are in the module and
90 /// look for functions that have the same name. More often than not, there will
91 /// be things like:
92 /// void "foo"(...)
93 /// void "foo"(int, int)
94 /// because of the way things are declared in C. If this is the case, patch
95 /// things up.
96 ///
97 /// This is an interprocedural pass.
98 ///
99 ModulePass *createFunctionResolvingPass();
100
101 //===----------------------------------------------------------------------===//
10289 /// createFunctionInliningPass - Return a new pass object that uses a heuristic
10390 /// to inline direct function calls to small functions.
10491 ///
162149 ///
163150 FunctionPass *createSingleLoopExtractorPass();
164151
165 // createBlockExtractorPass - This pass extracts all blocks (except those
166 // specified in the argument list) from the functions in the module.
167 //
152 /// createBlockExtractorPass - This pass extracts all blocks (except those
153 /// specified in the argument list) from the functions in the module.
154 ///
168155 ModulePass *createBlockExtractorPass(std::vector &BTNE);
169156
170 // createOptimizeWellKnownCallsPass - This pass optimizes specific calls to
171 // specific well-known (library) functions.
157 /// createOptimizeWellKnownCallsPass - This pass optimizes specific calls to
158 /// specific well-known (library) functions.
172159 ModulePass *createSimplifyLibCallsPass();
173160
174161
175 // createIndMemRemPass - This pass removes potential indirect calls of
176 // malloc and free
162 /// createIndMemRemPass - This pass removes potential indirect calls of
163 /// malloc and free
177164 ModulePass *createIndMemRemPass();
165
166 /// createStripDeadPrototypesPass - This pass removes any function declarations
167 /// (prototypes) that are not used.
168 ModulePass *createStripDeadPrototypesPass();
178169
179170 } // End llvm namespace
180171
3030 class Function;
3131 class GlobalVariable;
3232 class InlineAsm;
33 class SymbolTable;
33 class ValueSymbolTable;
34 class TypeSymbolTable;
3435
3536 //===----------------------------------------------------------------------===//
3637 // Value Class
7171 /// @brief Get a name unique to this symbol table
7272 std::string getUniqueName(const std::string &BaseName) const;
7373
74 /// @return 1 if the name is in the symbol table, 0 otherwise
75 /// @brief Determine if a name is in the symbol table
76 ValueMap::size_type count(const std::string &name) const {
77 return vmap.count(name);
78 }
79
7480 /// This function can be used from the debugger to display the
7581 /// content of the symbol table while debugging.
7682 /// @brief Print out symbol table on stderr
110116 /// This method removes a value from the symbol table. The name of the
111117 /// Value is extracted from \p Val and used to lookup the Value in the
112118 /// symbol table. If the Value is not in the symbol table, this method
113 /// returns false.
114 /// @returns true if \p Val was successfully erased, false otherwise
119 /// returns false. \p Val is not deleted, just removed from the symbol table.
120 /// @returns true if \p Val was successfully removed, false otherwise
115121 /// @brief Remove a value from the symbol table.
116 bool erase(Value* Val);
122 bool remove(Value* Val);
117123
118124 /// Given a value with a non-empty name, remove its existing
119125 /// entry from the symbol table and insert a new one for Name. This is
868868 #define YY_MORE_ADJ 0
869869 #define YY_RESTORE_YY_MORE_OFFSET
870870 char *yytext;
871 #line 1 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
871 #line 1 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
872872 #define INITIAL 0
873873 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
874874 //
883883 //
884884 //===----------------------------------------------------------------------===*/
885885 #define YY_NEVER_INTERACTIVE 1
886 #line 28 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
886 #line 28 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
887887 #include "ParserInternals.h"
888888 #include "llvm/Module.h"
889889 #include
11671167 register char *yy_cp = NULL, *yy_bp = NULL;
11681168 register int yy_act;
11691169
1170 #line 189 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1170 #line 189 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
11711171
11721172
11731173 #line 1175 "Lexer.cpp"
12631263 { /* beginning of action switch */
12641264 case 1:
12651265 YY_RULE_SETUP
1266 #line 191 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1266 #line 191 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
12671267 { /* Ignore comments for now */ }
12681268 YY_BREAK
12691269 case 2:
12701270 YY_RULE_SETUP
1271 #line 193 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1271 #line 193 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
12721272 { return BEGINTOK; }
12731273 YY_BREAK
12741274 case 3:
12751275 YY_RULE_SETUP
1276 #line 194 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1276 #line 194 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
12771277 { return ENDTOK; }
12781278 YY_BREAK
12791279 case 4:
12801280 YY_RULE_SETUP
1281 #line 195 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1281 #line 195 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
12821282 { return TRUETOK; }
12831283 YY_BREAK
12841284 case 5:
12851285 YY_RULE_SETUP
1286 #line 196 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1286 #line 196 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
12871287 { return FALSETOK; }
12881288 YY_BREAK
12891289 case 6:
12901290 YY_RULE_SETUP
1291 #line 197 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1291 #line 197 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
12921292 { return DECLARE; }
12931293 YY_BREAK
12941294 case 7:
12951295 YY_RULE_SETUP
1296 #line 198 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1296 #line 198 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
12971297 { return DEFINE; }
12981298 YY_BREAK
12991299 case 8:
13001300 YY_RULE_SETUP
1301 #line 199 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1301 #line 199 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13021302 { return GLOBAL; }
13031303 YY_BREAK
13041304 case 9:
13051305 YY_RULE_SETUP
1306 #line 200 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1306 #line 200 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13071307 { return CONSTANT; }
13081308 YY_BREAK
13091309 case 10:
13101310 YY_RULE_SETUP
1311 #line 201 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1311 #line 201 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13121312 { return INTERNAL; }
13131313 YY_BREAK
13141314 case 11:
13151315 YY_RULE_SETUP
1316 #line 202 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1316 #line 202 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13171317 { return LINKONCE; }
13181318 YY_BREAK
13191319 case 12:
13201320 YY_RULE_SETUP
1321 #line 203 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1321 #line 203 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13221322 { return WEAK; }
13231323 YY_BREAK
13241324 case 13:
13251325 YY_RULE_SETUP
1326 #line 204 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1326 #line 204 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13271327 { return APPENDING; }
13281328 YY_BREAK
13291329 case 14:
13301330 YY_RULE_SETUP
1331 #line 205 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1331 #line 205 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13321332 { return DLLIMPORT; }
13331333 YY_BREAK
13341334 case 15:
13351335 YY_RULE_SETUP
1336 #line 206 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1336 #line 206 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13371337 { return DLLEXPORT; }
13381338 YY_BREAK
13391339 case 16:
13401340 YY_RULE_SETUP
1341 #line 207 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1341 #line 207 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13421342 { return HIDDEN; }
13431343 YY_BREAK
13441344 case 17:
13451345 YY_RULE_SETUP
1346 #line 208 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1346 #line 208 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13471347 { return EXTERN_WEAK; }
13481348 YY_BREAK
13491349 case 18:
13501350 YY_RULE_SETUP
1351 #line 209 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1351 #line 209 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13521352 { return EXTERNAL; }
13531353 YY_BREAK
13541354 case 19:
13551355 YY_RULE_SETUP
1356 #line 210 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1356 #line 210 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13571357 { return IMPLEMENTATION; }
13581358 YY_BREAK
13591359 case 20:
13601360 YY_RULE_SETUP
1361 #line 211 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1361 #line 211 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13621362 { return ZEROINITIALIZER; }
13631363 YY_BREAK
13641364 case 21:
13651365 YY_RULE_SETUP
1366 #line 212 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1366 #line 212 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13671367 { return DOTDOTDOT; }
13681368 YY_BREAK
13691369 case 22:
13701370 YY_RULE_SETUP
1371 #line 213 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1371 #line 213 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13721372 { return UNDEF; }
13731373 YY_BREAK
13741374 case 23:
13751375 YY_RULE_SETUP
1376 #line 214 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1376 #line 214 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13771377 { return NULL_TOK; }
13781378 YY_BREAK
13791379 case 24:
13801380 YY_RULE_SETUP
1381 #line 215 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1381 #line 215 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13821382 { return TO; }
13831383 YY_BREAK
13841384 case 25:
13851385 YY_RULE_SETUP
1386 #line 216 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1386 #line 216 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13871387 { return TAIL; }
13881388 YY_BREAK
13891389 case 26:
13901390 YY_RULE_SETUP
1391 #line 217 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1391 #line 217 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13921392 { return TARGET; }
13931393 YY_BREAK
13941394 case 27:
13951395 YY_RULE_SETUP
1396 #line 218 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1396 #line 218 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
13971397 { return TRIPLE; }
13981398 YY_BREAK
13991399 case 28:
14001400 YY_RULE_SETUP
1401 #line 219 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1401 #line 219 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14021402 { return DEPLIBS; }
14031403 YY_BREAK
14041404 case 29:
14051405 YY_RULE_SETUP
1406 #line 220 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1406 #line 220 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14071407 { return DATALAYOUT; }
14081408 YY_BREAK
14091409 case 30:
14101410 YY_RULE_SETUP
1411 #line 221 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1411 #line 221 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14121412 { return VOLATILE; }
14131413 YY_BREAK
14141414 case 31:
14151415 YY_RULE_SETUP
1416 #line 222 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1416 #line 222 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14171417 { return ALIGN; }
14181418 YY_BREAK
14191419 case 32:
14201420 YY_RULE_SETUP
1421 #line 223 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1421 #line 223 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14221422 { return SECTION; }
14231423 YY_BREAK
14241424 case 33:
14251425 YY_RULE_SETUP
1426 #line 224 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1426 #line 224 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14271427 { return MODULE; }
14281428 YY_BREAK
14291429 case 34:
14301430 YY_RULE_SETUP
1431 #line 225 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1431 #line 225 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14321432 { return ASM_TOK; }
14331433 YY_BREAK
14341434 case 35:
14351435 YY_RULE_SETUP
1436 #line 226 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1436 #line 226 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14371437 { return SIDEEFFECT; }
14381438 YY_BREAK
14391439 case 36:
14401440 YY_RULE_SETUP
1441 #line 228 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1441 #line 228 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14421442 { return CC_TOK; }
14431443 YY_BREAK
14441444 case 37:
14451445 YY_RULE_SETUP
1446 #line 229 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1446 #line 229 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14471447 { return CCC_TOK; }
14481448 YY_BREAK
14491449 case 38:
14501450 YY_RULE_SETUP
1451 #line 230 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1451 #line 230 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14521452 { return FASTCC_TOK; }
14531453 YY_BREAK
14541454 case 39:
14551455 YY_RULE_SETUP
1456 #line 231 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1456 #line 231 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14571457 { return COLDCC_TOK; }
14581458 YY_BREAK
14591459 case 40:
14601460 YY_RULE_SETUP
1461 #line 232 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1461 #line 232 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14621462 { return X86_STDCALLCC_TOK; }
14631463 YY_BREAK
14641464 case 41:
14651465 YY_RULE_SETUP
1466 #line 233 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1466 #line 233 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14671467 { return X86_FASTCALLCC_TOK; }
14681468 YY_BREAK
14691469 case 42:
14701470 YY_RULE_SETUP
1471 #line 235 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1471 #line 235 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14721472 { return INREG; }
14731473 YY_BREAK
14741474 case 43:
14751475 YY_RULE_SETUP
1476 #line 236 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1476 #line 236 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14771477 { return SRET; }
14781478 YY_BREAK
14791479 case 44:
14801480 YY_RULE_SETUP
1481 #line 238 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1481 #line 238 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14821482 { RET_TY(Type::VoidTy, VOID); }
14831483 YY_BREAK
14841484 case 45:
14851485 YY_RULE_SETUP
1486 #line 239 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1486 #line 239 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14871487 { RET_TY(Type::FloatTy, FLOAT); }
14881488 YY_BREAK
14891489 case 46:
14901490 YY_RULE_SETUP
1491 #line 240 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1491 #line 240 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14921492 { RET_TY(Type::DoubleTy,DOUBLE);}
14931493 YY_BREAK
14941494 case 47:
14951495 YY_RULE_SETUP
1496 #line 241 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1496 #line 241 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
14971497 { RET_TY(Type::LabelTy, LABEL); }
14981498 YY_BREAK
14991499 case 48:
15001500 YY_RULE_SETUP
1501 #line 242 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1501 #line 242 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15021502 { return TYPE; }
15031503 YY_BREAK
15041504 case 49:
15051505 YY_RULE_SETUP
1506 #line 243 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1506 #line 243 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15071507 { return OPAQUE; }
15081508 YY_BREAK
15091509 case 50:
15101510 YY_RULE_SETUP
1511 #line 244 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1511 #line 244 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15121512 { uint64_t NumBits = atoull(yytext+1);
15131513 if (NumBits < IntegerType::MIN_INT_BITS ||
15141514 NumBits > IntegerType::MAX_INT_BITS)
15191519 YY_BREAK
15201520 case 51:
15211521 YY_RULE_SETUP
1522 #line 252 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1522 #line 252 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15231523 { RET_TOK(BinaryOpVal, Add, ADD); }
15241524 YY_BREAK
15251525 case 52:
15261526 YY_RULE_SETUP
1527 #line 253 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1527 #line 253 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15281528 { RET_TOK(BinaryOpVal, Sub, SUB); }
15291529 YY_BREAK
15301530 case 53:
15311531 YY_RULE_SETUP
1532 #line 254 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1532 #line 254 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15331533 { RET_TOK(BinaryOpVal, Mul, MUL); }
15341534 YY_BREAK
15351535 case 54:
15361536 YY_RULE_SETUP
1537 #line 255 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1537 #line 255 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15381538 { RET_TOK(BinaryOpVal, UDiv, UDIV); }
15391539 YY_BREAK
15401540 case 55:
15411541 YY_RULE_SETUP
1542 #line 256 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1542 #line 256 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15431543 { RET_TOK(BinaryOpVal, SDiv, SDIV); }
15441544 YY_BREAK
15451545 case 56:
15461546 YY_RULE_SETUP
1547 #line 257 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1547 #line 257 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15481548 { RET_TOK(BinaryOpVal, FDiv, FDIV); }
15491549 YY_BREAK
15501550 case 57:
15511551 YY_RULE_SETUP
1552 #line 258 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1552 #line 258 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15531553 { RET_TOK(BinaryOpVal, URem, UREM); }
15541554 YY_BREAK
15551555 case 58:
15561556 YY_RULE_SETUP
1557 #line 259 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1557 #line 259 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15581558 { RET_TOK(BinaryOpVal, SRem, SREM); }
15591559 YY_BREAK
15601560 case 59:
15611561 YY_RULE_SETUP
1562 #line 260 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1562 #line 260 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15631563 { RET_TOK(BinaryOpVal, FRem, FREM); }
15641564 YY_BREAK
15651565 case 60:
15661566 YY_RULE_SETUP
1567 #line 261 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1567 #line 261 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15681568 { RET_TOK(BinaryOpVal, Shl, SHL); }
15691569 YY_BREAK
15701570 case 61:
15711571 YY_RULE_SETUP
1572 #line 262 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1572 #line 262 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15731573 { RET_TOK(BinaryOpVal, LShr, LSHR); }
15741574 YY_BREAK
15751575 case 62:
15761576 YY_RULE_SETUP
1577 #line 263 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1577 #line 263 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15781578 { RET_TOK(BinaryOpVal, AShr, ASHR); }
15791579 YY_BREAK
15801580 case 63:
15811581 YY_RULE_SETUP
1582 #line 264 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1582 #line 264 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15831583 { RET_TOK(BinaryOpVal, And, AND); }
15841584 YY_BREAK
15851585 case 64:
15861586 YY_RULE_SETUP
1587 #line 265 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1587 #line 265 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15881588 { RET_TOK(BinaryOpVal, Or , OR ); }
15891589 YY_BREAK
15901590 case 65:
15911591 YY_RULE_SETUP
1592 #line 266 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1592 #line 266 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15931593 { RET_TOK(BinaryOpVal, Xor, XOR); }
15941594 YY_BREAK
15951595 case 66:
15961596 YY_RULE_SETUP
1597 #line 267 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1597 #line 267 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
15981598 { RET_TOK(OtherOpVal, ICmp, ICMP); }
15991599 YY_BREAK
16001600 case 67:
16011601 YY_RULE_SETUP
1602 #line 268 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1602 #line 268 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16031603 { RET_TOK(OtherOpVal, FCmp, FCMP); }
16041604 YY_BREAK
16051605 case 68:
16061606 YY_RULE_SETUP
1607 #line 270 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1607 #line 270 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16081608 { return EQ; }
16091609 YY_BREAK
16101610 case 69:
16111611 YY_RULE_SETUP
1612 #line 271 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1612 #line 271 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16131613 { return NE; }
16141614 YY_BREAK
16151615 case 70:
16161616 YY_RULE_SETUP
1617 #line 272 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1617 #line 272 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16181618 { return SLT; }
16191619 YY_BREAK
16201620 case 71:
16211621 YY_RULE_SETUP
1622 #line 273 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1622 #line 273 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16231623 { return SGT; }
16241624 YY_BREAK
16251625 case 72:
16261626 YY_RULE_SETUP
1627 #line 274 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1627 #line 274 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16281628 { return SLE; }
16291629 YY_BREAK
16301630 case 73:
16311631 YY_RULE_SETUP
1632 #line 275 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1632 #line 275 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16331633 { return SGE; }
16341634 YY_BREAK
16351635 case 74:
16361636 YY_RULE_SETUP
1637 #line 276 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1637 #line 276 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16381638 { return ULT; }
16391639 YY_BREAK
16401640 case 75:
16411641 YY_RULE_SETUP
1642 #line 277 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1642 #line 277 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16431643 { return UGT; }
16441644 YY_BREAK
16451645 case 76:
16461646 YY_RULE_SETUP
1647 #line 278 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1647 #line 278 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16481648 { return ULE; }
16491649 YY_BREAK
16501650 case 77:
16511651 YY_RULE_SETUP
1652 #line 279 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1652 #line 279 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16531653 { return UGE; }
16541654 YY_BREAK
16551655 case 78:
16561656 YY_RULE_SETUP
1657 #line 280 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1657 #line 280 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16581658 { return OEQ; }
16591659 YY_BREAK
16601660 case 79:
16611661 YY_RULE_SETUP
1662 #line 281 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1662 #line 281 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16631663 { return ONE; }
16641664 YY_BREAK
16651665 case 80:
16661666 YY_RULE_SETUP
1667 #line 282 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1667 #line 282 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16681668 { return OLT; }
16691669 YY_BREAK
16701670 case 81:
16711671 YY_RULE_SETUP
1672 #line 283 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1672 #line 283 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16731673 { return OGT; }
16741674 YY_BREAK
16751675 case 82:
16761676 YY_RULE_SETUP
1677 #line 284 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1677 #line 284 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16781678 { return OLE; }
16791679 YY_BREAK
16801680 case 83:
16811681 YY_RULE_SETUP
1682 #line 285 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1682 #line 285 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16831683 { return OGE; }
16841684 YY_BREAK
16851685 case 84:
16861686 YY_RULE_SETUP
1687 #line 286 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1687 #line 286 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16881688 { return ORD; }
16891689 YY_BREAK
16901690 case 85:
16911691 YY_RULE_SETUP
1692 #line 287 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1692 #line 287 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16931693 { return UNO; }
16941694 YY_BREAK
16951695 case 86:
16961696 YY_RULE_SETUP
1697 #line 288 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1697 #line 288 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
16981698 { return UEQ; }
16991699 YY_BREAK
17001700 case 87:
17011701 YY_RULE_SETUP
1702 #line 289 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1702 #line 289 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17031703 { return UNE; }
17041704 YY_BREAK
17051705 case 88:
17061706 YY_RULE_SETUP
1707 #line 291 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1707 #line 291 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17081708 { RET_TOK(OtherOpVal, PHI, PHI_TOK); }
17091709 YY_BREAK
17101710 case 89:
17111711 YY_RULE_SETUP
1712 #line 292 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1712 #line 292 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17131713 { RET_TOK(OtherOpVal, Call, CALL); }
17141714 YY_BREAK
17151715 case 90:
17161716 YY_RULE_SETUP
1717 #line 293 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1717 #line 293 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17181718 { RET_TOK(CastOpVal, Trunc, TRUNC); }
17191719 YY_BREAK
17201720 case 91:
17211721 YY_RULE_SETUP
1722 #line 294 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1722 #line 294 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17231723 { RET_TOK(CastOpVal, ZExt, ZEXT); }
17241724 YY_BREAK
17251725 case 92:
17261726 YY_RULE_SETUP
1727 #line 295 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1727 #line 295 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17281728 { RET_TOK(CastOpVal, SExt, SEXT); }
17291729 YY_BREAK
17301730 case 93:
17311731 YY_RULE_SETUP
1732 #line 296 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1732 #line 296 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17331733 { RET_TOK(CastOpVal, FPTrunc, FPTRUNC); }
17341734 YY_BREAK
17351735 case 94:
17361736 YY_RULE_SETUP
1737 #line 297 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1737 #line 297 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17381738 { RET_TOK(CastOpVal, FPExt, FPEXT); }
17391739 YY_BREAK
17401740 case 95:
17411741 YY_RULE_SETUP
1742 #line 298 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1742 #line 298 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17431743 { RET_TOK(CastOpVal, UIToFP, UITOFP); }
17441744 YY_BREAK
17451745 case 96:
17461746 YY_RULE_SETUP
1747 #line 299 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1747 #line 299 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17481748 { RET_TOK(CastOpVal, SIToFP, SITOFP); }
17491749 YY_BREAK
17501750 case 97:
17511751 YY_RULE_SETUP
1752 #line 300 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1752 #line 300 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17531753 { RET_TOK(CastOpVal, FPToUI, FPTOUI); }
17541754 YY_BREAK
17551755 case 98:
17561756 YY_RULE_SETUP
1757 #line 301 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1757 #line 301 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17581758 { RET_TOK(CastOpVal, FPToSI, FPTOSI); }
17591759 YY_BREAK
17601760 case 99:
17611761 YY_RULE_SETUP
1762 #line 302 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1762 #line 302 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17631763 { RET_TOK(CastOpVal, IntToPtr, INTTOPTR); }
17641764 YY_BREAK
17651765 case 100:
17661766 YY_RULE_SETUP
1767 #line 303 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1767 #line 303 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17681768 { RET_TOK(CastOpVal, PtrToInt, PTRTOINT); }
17691769 YY_BREAK
17701770 case 101:
17711771 YY_RULE_SETUP
1772 #line 304 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1772 #line 304 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17731773 { RET_TOK(CastOpVal, BitCast, BITCAST); }
17741774 YY_BREAK
17751775 case 102:
17761776 YY_RULE_SETUP
1777 #line 305 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1777 #line 305 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17781778 { RET_TOK(OtherOpVal, Select, SELECT); }
17791779 YY_BREAK
17801780 case 103:
17811781 YY_RULE_SETUP
1782 #line 306 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1782 #line 306 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17831783 { RET_TOK(OtherOpVal, VAArg , VAARG); }
17841784 YY_BREAK
17851785 case 104:
17861786 YY_RULE_SETUP
1787 #line 307 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1787 #line 307 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17881788 { RET_TOK(TermOpVal, Ret, RET); }
17891789 YY_BREAK
17901790 case 105:
17911791 YY_RULE_SETUP
1792 #line 308 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1792 #line 308 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17931793 { RET_TOK(TermOpVal, Br, BR); }
17941794 YY_BREAK
17951795 case 106:
17961796 YY_RULE_SETUP
1797 #line 309 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1797 #line 309 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
17981798 { RET_TOK(TermOpVal, Switch, SWITCH); }
17991799 YY_BREAK
18001800 case 107:
18011801 YY_RULE_SETUP
1802 #line 310 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1802 #line 310 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18031803 { RET_TOK(TermOpVal, Invoke, INVOKE); }
18041804 YY_BREAK
18051805 case 108:
18061806 YY_RULE_SETUP
1807 #line 311 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1807 #line 311 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18081808 { RET_TOK(TermOpVal, Unwind, UNWIND); }
18091809 YY_BREAK
18101810 case 109:
18111811 YY_RULE_SETUP
1812 #line 312 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1812 #line 312 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18131813 { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
18141814 YY_BREAK
18151815 case 110:
18161816 YY_RULE_SETUP
1817 #line 314 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1817 #line 314 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18181818 { RET_TOK(MemOpVal, Malloc, MALLOC); }
18191819 YY_BREAK
18201820 case 111:
18211821 YY_RULE_SETUP
1822 #line 315 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1822 #line 315 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18231823 { RET_TOK(MemOpVal, Alloca, ALLOCA); }
18241824 YY_BREAK
18251825 case 112:
18261826 YY_RULE_SETUP
1827 #line 316 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1827 #line 316 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18281828 { RET_TOK(MemOpVal, Free, FREE); }
18291829 YY_BREAK
18301830 case 113:
18311831 YY_RULE_SETUP
1832 #line 317 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1832 #line 317 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18331833 { RET_TOK(MemOpVal, Load, LOAD); }
18341834 YY_BREAK
18351835 case 114:
18361836 YY_RULE_SETUP
1837 #line 318 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1837 #line 318 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18381838 { RET_TOK(MemOpVal, Store, STORE); }
18391839 YY_BREAK
18401840 case 115:
18411841 YY_RULE_SETUP
1842 #line 319 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1842 #line 319 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18431843 { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
18441844 YY_BREAK
18451845 case 116:
18461846 YY_RULE_SETUP
1847 #line 321 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1847 #line 321 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18481848 { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
18491849 YY_BREAK
18501850 case 117:
18511851 YY_RULE_SETUP
1852 #line 322 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1852 #line 322 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18531853 { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
18541854 YY_BREAK
18551855 case 118:
18561856 YY_RULE_SETUP
1857 #line 323 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1857 #line 323 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18581858 { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
18591859 YY_BREAK
18601860 case 119:
18611861 YY_RULE_SETUP
1862 #line 326 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1862 #line 326 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18631863 {
18641864 UnEscapeLexed(yytext+1);
18651865 llvmAsmlval.StrVal = strdup(yytext+1); // Skip %
18681868 YY_BREAK
18691869 case 120:
18701870 YY_RULE_SETUP
1871 #line 331 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1871 #line 331 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18721872 {
18731873 UnEscapeLexed(yytext+1);
18741874 llvmAsmlval.StrVal = strdup(yytext+1); // Skip @
18771877 YY_BREAK
18781878 case 121:
18791879 YY_RULE_SETUP
1880 #line 336 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1880 #line 336 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18811881 {
18821882 yytext[strlen(yytext)-1] = 0; // nuke colon
18831883 UnEscapeLexed(yytext);
18871887 YY_BREAK
18881888 case 122:
18891889 YY_RULE_SETUP
1890 #line 342 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1890 #line 342 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
18911891 {
18921892 yytext[strlen(yytext)-2] = 0; // nuke colon, end quote
18931893 UnEscapeLexed(yytext+1);
18971897 YY_BREAK
18981898 case 123:
18991899 YY_RULE_SETUP
1900 #line 349 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1900 #line 349 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19011901 { // Note that we cannot unescape a string constant here! The
19021902 // string constant might contain a \00 which would not be
19031903 // understood by the string stuff. It is valid to make a
19101910 YY_BREAK
19111911 case 124:
19121912 YY_RULE_SETUP
1913 #line 358 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1913 #line 358 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19141914 {
19151915 yytext[strlen(yytext)-1] = 0; // nuke end quote
19161916 llvmAsmlval.StrVal = strdup(yytext+2); // Nuke @, quote
19191919 YY_BREAK
19201920 case 125:
19211921 YY_RULE_SETUP
1922 #line 366 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1922 #line 366 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19231923 { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; }
19241924 YY_BREAK
19251925 case 126:
19261926 YY_RULE_SETUP
1927 #line 367 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1927 #line 367 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19281928 {
19291929 uint64_t Val = atoull(yytext+1);
19301930 // +1: we have bigger negative range
19361936 YY_BREAK
19371937 case 127:
19381938 YY_RULE_SETUP
1939 #line 375 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1939 #line 375 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19401940 {
19411941 llvmAsmlval.UInt64Val = HexIntToVal(yytext+3);
19421942 return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL;
19441944 YY_BREAK
19451945 case 128:
19461946 YY_RULE_SETUP
1947 #line 380 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1947 #line 380 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19481948 {
19491949 uint64_t Val = atoull(yytext+1);
19501950 if ((unsigned)Val != Val)
19551955 YY_BREAK
19561956 case 129:
19571957 YY_RULE_SETUP
1958 #line 387 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1958 #line 387 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19591959 {
19601960 uint64_t Val = atoull(yytext+1);
19611961 if ((unsigned)Val != Val)
19661966 YY_BREAK
19671967 case 130:
19681968 YY_RULE_SETUP
1969 #line 395 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1969 #line 395 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19701970 { llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
19711971 YY_BREAK
19721972 case 131:
19731973 YY_RULE_SETUP
1974 #line 396 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1974 #line 396 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19751975 { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
19761976 YY_BREAK
19771977 case YY_STATE_EOF(INITIAL):
1978 #line 398 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1978 #line 398 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19791979 {
19801980 /* Make sure to free the internal buffers for flex when we are
19811981 * done reading our input!
19861986 YY_BREAK
19871987 case 132:
19881988 YY_RULE_SETUP
1989 #line 406 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1989 #line 406 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19901990 { /* Ignore whitespace */ }
19911991 YY_BREAK
19921992 case 133:
19931993 YY_RULE_SETUP
1994 #line 407 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1994 #line 407 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
19951995 { return yytext[0]; }
19961996 YY_BREAK
19971997 case 134:
19981998 YY_RULE_SETUP
1999 #line 409 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
1999 #line 409 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
20002000 YY_FATAL_ERROR( "flex scanner jammed" );
20012001 YY_BREAK
20022002 #line 2004 "Lexer.cpp"
28772877 return 0;
28782878 }
28792879 #endif
2880 #line 409 "/proj/llvm/llvm-4/lib/AsmParser/Lexer.l"
2881
2880 #line 409 "/proj/llvm/llvm-3/lib/AsmParser/Lexer.l"
2881
329329
330330
331331 /* Copy the first part of user declarations. */
332 #line 14 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
332 #line 14 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
333333
334334 #include "ParserInternals.h"
335335 #include "llvm/CallingConv.h"
336336 #include "llvm/InlineAsm.h"
337337 #include "llvm/Instructions.h"
338338 #include "llvm/Module.h"
339 #include "llvm/SymbolTable.h"
339 #include "llvm/ValueSymbolTable.h"
340340 #include "llvm/Support/GetElementPtrTypeIterator.h"
341341 #include "llvm/Support/CommandLine.h"
342342 #include "llvm/ADT/SmallVector.h"
528528
529529 std::map Values; // Keep track of #'d definitions
530530 std::map LateResolveValues;
531 bool isDeclare; // Is this function a forward declararation?
531 bool isDeclare; // Is this function a forward declararation?
532532 GlobalValue::LinkageTypes Linkage; // Linkage for forward declaration.
533533 GlobalValue::VisibilityTypes Visibility;
534534
660660
661661 // Module constants occupy the lowest numbered slots...
662662 std::map::iterator VI = CurModule.Values.find(Ty);
663 if (VI == CurModule.Values.end()) return 0;
664 if (D.Num >= VI->second.size()) return 0;
663 if (VI == CurModule.Values.end())
664 return 0;
665 if (D.Num >= VI->second.size())
666 return 0;
665667 return VI->second[Num];
666668 }
667669
668670 case ValID::LocalName: { // Is it a named definition?
669 if (!inFunctionScope()) return 0;
670 SymbolTable &SymTab = CurFun.CurrentFunction->getValueSymbolTable();
671 Value *N = SymTab.lookup(Ty, D.Name);
672 if (N == 0) return 0;
671 if (!inFunctionScope())
672 return 0;
673 ValueSymbolTable &SymTab = CurFun.CurrentFunction->getValueSymbolTable();
674 Value *N = SymTab.lookup(D.Name);
675 if (N == 0)
676 return 0;
677 if (N->getType() != Ty)
678 return 0;
673679
674680 D.destroy(); // Free old strdup'd memory...
675681 return N;
676682 }
677683 case ValID::GlobalName: { // Is it a named definition?
678 SymbolTable &SymTab = CurModule.CurrentModule->getValueSymbolTable();
679 Value *N = SymTab.lookup(Ty, D.Name);
680 if (N == 0) return 0;
684 ValueSymbolTable &SymTab = CurModule.CurrentModule->getValueSymbolTable();
685 Value *N = SymTab.lookup(D.Name);
686 if (N == 0)
687 return 0;
688 if (N->getType() != Ty)
689 return 0;
681690
682691 D.destroy(); // Free old strdup'd memory...
683692 return N;
818827 break;
819828 case ValID::LocalName: // Is it a named definition?
820829 Name = ID.Name;
821 if (Value *N = CurFun.CurrentFunction->
822 getValueSymbolTable().lookup(Type::LabelTy, Name))
830 Value *N = CurFun.CurrentFunction->getValueSymbolTable().lookup(Name);
831 if (N && N->getType()->getTypeID() == Type::LabelTyID)
823832 BB = cast(N);
824833 break;
825834 }
959968 }
960969
961970 assert(inFunctionScope() && "Must be in function scope!");
962 SymbolTable &ST = CurFun.CurrentFunction->getValueSymbolTable();
963 if (ST.lookup(V->getType(), Name)) {
971 ValueSymbolTable &ST = CurFun.CurrentFunction->getValueSymbolTable();
972 if (ST.lookup(Name)) {
964973 GenerateError("Redefinition of value '" + Name + "' of type '" +
965974 V->getType()->getDescription() + "'");
966975 return;
10141023 return GV;
10151024 }
10161025
1017 // If this global has a name, check to see if there is already a definition
1018 // of this global in the module. If so, it is an error.
1026 // If this global has a name
10191027 if (!Name.empty()) {
1020 // We are a simple redefinition of a value, check to see if it is defined
1021 // the same as the old one.
1022 if (CurModule.CurrentModule->getGlobalVariable(Name, Ty)) {
1023 GenerateError("Redefinition of global variable named '" + Name +
1024 "' of type '" + Ty->getDescription() + "'");
1025 return 0;
1026 }
1028 // if the global we're parsing has an initializer (is a definition) and
1029 // has external linkage.
1030 if (Initializer && Linkage != GlobalValue::InternalLinkage)
1031 // If there is already a global with external linkage with this name
1032 if (CurModule.CurrentModule->getGlobalVariable(Name, false)) {
1033 // If we allow this GVar to get created, it will be renamed in the
1034 // symbol table because it conflicts with an existing GVar. We can't
1035 // allow redefinition of GVars whose linking indicates that their name
1036 // must stay the same. Issue the error.
1037 GenerateError("Redefinition of global variable named '" + Name +
1038 "' of type '" + Ty->getDescription() + "'");
1039 return 0;
1040 }
10271041 }
10281042
10291043 // Otherwise there is no existing GV to use, create one now.
12211235 #endif
12221236
12231237 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
1224 #line 886 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
1238 #line 900 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
12251239 typedef union YYSTYPE {
12261240 llvm::Module *ModuleVal;
12271241 llvm::Function *FunctionVal;
12681282 llvm::FCmpInst::Predicate FPredicate;
12691283 } YYSTYPE;
12701284 /* Line 196 of yacc.c. */
1271 #line 1273 "llvmAsmParser.tab.c"
1285 #line 1287 "llvmAsmParser.tab.c"
12721286 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
12731287 # define YYSTYPE_IS_DECLARED 1
12741288 # define YYSTYPE_IS_TRIVIAL 1
12801294
12811295
12821296 /* Line 219 of yacc.c. */
1283 #line 1285 "llvmAsmParser.tab.c"
1297 #line 1299 "llvmAsmParser.tab.c"
12841298
12851299 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
12861300 # define YYSIZE_T __SIZE_TYPE__
16281642 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
16291643 static const unsigned short int yyrline[] =
16301644 {
1631 0, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033,
1632 1033, 1034, 1034, 1034, 1034, 1034, 1034, 1035, 1035, 1035,
1633 1035, 1035, 1035, 1036, 1036, 1036, 1036, 1036, 1036, 1039,
1634 1039, 1040, 1040, 1041, 1041, 1042, 1042, 1043, 1043, 1047,
1635 1047, 1048, 1048, 1049, 1049, 1050, 1050, 1051, 1051, 1052,
1636 1052, 1053, 1053, 1054, 1055, 1060, 1061, 1061, 1063, 1063,
1637 1064, 1064, 1068, 1072, 1077, 1077, 1079, 1083, 1089, 1090,
1638 1091, 1092, 1093, 1097, 1098, 1099, 1103, 1104, 1108, 1109,
1639 1110, 1114, 1115, 1116, 1117, 1118, 1121, 1122, 1123, 1124,
1640 1125, 1126, 1127, 1134, 1135, 1136, 1137, 1140, 1141, 1146,
1641 1147, 1150, 1151, 1158, 1159, 1165, 1166, 1174, 1182, 1183,
1642 1188, 1189, 1190, 1195, 1208, 1208, 1208, 1208, 1211, 1215,
1643 1219, 1226, 1231, 1239, 1257, 1275, 1280, 1292, 1302, 1306,
1644 1316, 1323, 1330, 1337, 1342, 1347, 1354, 1355, 1362, 1369,
1645 1377, 1382, 1393, 1421, 1437, 1466, 1494, 1519, 1538, 1563,
1646 1582, 1594, 1601, 1667, 1677, 1687, 1693, 1699, 1704, 1709,
1647 1717, 1729, 1750, 1758, 1764, 1775, 1780, 1785, 1791, 1797,
1648 1806, 1810, 1818, 1818, 1829, 1834, 1842, 1843, 1847, 1847,
1649 1851, 1851, 1854, 1857, 1869, 1893, 1904, 1904, 1914, 1914,
1650 1922, 1922, 1932, 1935, 1941, 1954, 1958, 1963, 1965, 1970,
1651 1975, 1984, 1994, 2005, 2009, 2018, 2027, 2032, 2138, 2138,
1652 2140, 2149, 2149, 2151, 2156, 2168, 2172, 2177, 2181, 2185,
1653 2189, 2193, 2197, 2201, 2205, 2209, 2234, 2238, 2252, 2256,
1654 2260, 2264, 2270, 2270, 2276, 2285, 2289, 2298, 2309, 2318,
1655 2330, 2343, 2347, 2351, 2356, 2366, 2385, 2394, 2461, 2465,
1656 2472, 2483, 2496, 2505, 2516, 2526, 2534, 2542, 2545, 2546,
1657 2553, 2557, 2562, 2583, 2600, 2613, 2626, 2638, 2646, 2653,
1658 2659, 2665, 2671, 2686, 2750, 2755, 2759, 2766, 2773, 2781,
1659 2788, 2796, 2804, 2818, 2835
1645 0, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
1646 1047, 1048, 1048, 1048, 1048, 1048, 1048, 1049, 1049, 1049,
1647 1049, 1049, 1049, 1050, 1050, 1050, 1050, 1050, 1050, 1053,
1648 1053, 1054, 1054, 1055, 1055, 1056, 1056, 1057, 1057, 1061,
1649 1061, 1062, 1062, 1063, 1063, 1064, 1064, 1065, 1065, 1066,
1650 1066, 1067, 1067, 1068, 1069, 1074, 1075, 1075, 1077, 1077,
1651 1078, 1078, 1082, 1086, 1091, 1091, 1093, 1097, 1103, 1104,
1652 1105, 1106, 1107, 1111, 1112, 1113, 1117, 1118, 1122, 1123,
1653 1124, 1128, 1129, 1130, 1131, 1132, 1135, 1136, 1137, 1138,
1654 1139, 1140, 1141, 1148, 1149, 1150, 1151, 1154, 1155, 1160,
1655 1161, 1164, 1165, 1172, 1173, 1179, 1180, 1188, 1196, 1197,
1656 1202, 1203, 1204, 1209, 1222, 1222, 1222, 1222, 1225, 1229,
1657 1233, 1240, 1245, 1253, 1271, 1289, 1294, 1306, 1316, 1320,
1658 1330, 1337, 1344, 1351, 1356, 1361, 1368, 1369, 1376, 1383,
1659 1391, 1396, 1407, 1435, 1451, 1480, 1508, 1533, 1552, 1577,
1660 1596, 1608, 1615, 1681, 1691, 1701, 1707, 1713, 1718, 1723,
1661 1731, 1743, 1764, 1772, 1778, 1789, 1794, 1799, 1805, 1811,
1662 1820, 1824, 1832, 1832, 1843, 1848, 1856, 1857, 1861, 1861,
1663 1865, 1865, 1868, 1871, 1883, 1907, 1918, 1918, 1928, 1928,
1664 1936, 1936, 1946, 1949, 1955, 1968, 1972, 1977, 1979, 1984,
1665 1989, 1998, 2008, 2019, 2023, 2032, 2041, 2046, 2158, 2158,
1666 2160, 2169, 2169, 2171, 2176, 2188, 2192, 2197, 2201, 2205,
1667 2209, 2213, 2217, 2221, 2225, 2229, 2254, 2258, 2272, 2276,
1668 2280, 2284, 2290, 2290, 2296, 2305, 2309, 2318, 2328, 2337,
1669 2349, 2362, 2366, 2370, 2375, 2385, 2404, 2413, 2480, 2484,
1670 2491, 2502, 2515, 2525, 2536, 2546, 2554, 2562, 2565, 2566,
1671 2573, 2577, 2582, 2603, 2620, 2633, 2646, 2658, 2666, 2673,
1672 2679, 2685, 2691, 2706, 2770, 2775, 2779, 2786, 2793, 2801,
1673 2808, 2816, 2824, 2838, 2855
16601674 };
16611675 #endif
16621676
29802994 switch (yyn)
29812995 {
29822996 case 29:
2983 #line 1039 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
2997 #line 1053 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
29842998 { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;}
29852999 break;
29863000
29873001 case 30:
2988 #line 1039 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3002 #line 1053 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
29893003 { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;}
29903004 break;
29913005
29923006 case 31:
2993 #line 1040 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3007 #line 1054 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
29943008 { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;}
29953009 break;
29963010
29973011 case 32:
2998 #line 1040 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3012 #line 1054 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
29993013 { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;}
30003014 break;
30013015
30023016 case 33:
3003 #line 1041 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3017 #line 1055 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30043018 { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;}
30053019 break;
30063020
30073021 case 34:
3008 #line 1041 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3022 #line 1055 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30093023 { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;}
30103024 break;
30113025
30123026 case 35:
3013 #line 1042 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3027 #line 1056 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30143028 { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;}
30153029 break;
30163030
30173031 case 36:
3018 #line 1042 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3032 #line 1056 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30193033 { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;}
30203034 break;
30213035
30223036 case 37:
3023 #line 1043 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3037 #line 1057 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30243038 { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;}
30253039 break;
30263040
30273041 case 38:
3028 #line 1043 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3042 #line 1057 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30293043 { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;}
30303044 break;
30313045
30323046 case 39:
3033 #line 1047 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3047 #line 1061 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30343048 { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;}
30353049 break;
30363050
30373051 case 40:
3038 #line 1047 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3052 #line 1061 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30393053 { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;}
30403054 break;
30413055
30423056 case 41:
3043 #line 1048 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3057 #line 1062 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30443058 { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;}
30453059 break;
30463060
30473061 case 42:
3048 #line 1048 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3062 #line 1062 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30493063 { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;}
30503064 break;
30513065
30523066 case 43:
3053 #line 1049 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3067 #line 1063 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30543068 { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;}
30553069 break;
30563070
30573071 case 44:
3058 #line 1049 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3072 #line 1063 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30593073 { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;}
30603074 break;
30613075
30623076 case 45:
3063 #line 1050 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3077 #line 1064 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30643078 { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;}
30653079 break;
30663080
30673081 case 46:
3068 #line 1050 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3082 #line 1064 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30693083 { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;}
30703084 break;
30713085
30723086 case 47:
3073 #line 1051 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3087 #line 1065 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30743088 { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;}
30753089 break;
30763090
30773091 case 48:
3078 #line 1051 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3092 #line 1065 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30793093 { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;}
30803094 break;
30813095
30823096 case 49:
3083 #line 1052 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3097 #line 1066 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30843098 { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;}
30853099 break;
30863100
30873101 case 50:
3088 #line 1052 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3102 #line 1066 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30893103 { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;}
30903104 break;
30913105
30923106 case 51:
3093 #line 1053 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3107 #line 1067 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30943108 { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;}
30953109 break;
30963110
30973111 case 52:
3098 #line 1053 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3112 #line 1067 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
30993113 { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;}
31003114 break;
31013115
31023116 case 53:
3103 #line 1054 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3117 #line 1068 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31043118 { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;}
31053119 break;
31063120
31073121 case 54:
3108 #line 1055 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3122 #line 1069 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31093123 { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;}
31103124 break;
31113125
31123126 case 61:
3113 #line 1064 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3127 #line 1078 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31143128 { (yyval.StrVal) = 0; ;}
31153129 break;
31163130
31173131 case 62:
3118 #line 1068 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3132 #line 1082 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31193133 {
31203134 (yyval.StrVal) = (yyvsp[-1].StrVal);
31213135 CHECK_FOR_ERROR
31233137 break;
31243138
31253139 case 63:
3126 #line 1072 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3140 #line 1086 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31273141 {
31283142 (yyval.StrVal) = 0;
31293143 CHECK_FOR_ERROR
31313145 break;
31323146
31333147 case 66:
3134 #line 1079 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3148 #line 1093 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31353149 {
31363150 (yyval.StrVal) = (yyvsp[-1].StrVal);
31373151 CHECK_FOR_ERROR
31393153 break;
31403154
31413155 case 67:
3142 #line 1083 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3156 #line 1097 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31433157 {
31443158 (yyval.StrVal) = 0;
31453159 CHECK_FOR_ERROR
31473161 break;
31483162
31493163 case 68:
3150 #line 1089 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3164 #line 1103 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31513165 { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
31523166 break;
31533167
31543168 case 69:
3155 #line 1090 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3169 #line 1104 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31563170 { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
31573171 break;
31583172
31593173 case 70:
3160 #line 1091 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3174 #line 1105 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31613175 { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
31623176 break;
31633177
31643178 case 71:
3165 #line 1092 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3179 #line 1106 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31663180 { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
31673181 break;
31683182
31693183 case 72:
3170 #line 1093 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3184 #line 1107 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31713185 { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
31723186 break;
31733187
31743188 case 73:
3175 #line 1097 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3189 #line 1111 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31763190 { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
31773191 break;
31783192
31793193 case 74:
3180 #line 1098 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3194 #line 1112 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31813195 { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
31823196 break;
31833197
31843198 case 75:
3185 #line 1099 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3199 #line 1113 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31863200 { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
31873201 break;
31883202
31893203 case 76:
3190 #line 1103 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3204 #line 1117 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31913205 { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;}
31923206 break;
31933207
31943208 case 77:
3195 #line 1104 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3209 #line 1118 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
31963210 { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;}
31973211 break;
31983212
31993213 case 78:
3200 #line 1108 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3214 #line 1122 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32013215 { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
32023216 break;
32033217
32043218 case 79:
3205 #line 1109 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3219 #line 1123 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32063220 { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
32073221 break;
32083222
32093223 case 80:
3210 #line 1110 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3224 #line 1124 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32113225 { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
32123226 break;
32133227
32143228 case 81:
3215 #line 1114 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3229 #line 1128 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32163230 { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
32173231 break;
32183232
32193233 case 82:
3220 #line 1115 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3234 #line 1129 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32213235 { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
32223236 break;
32233237
32243238 case 83:
3225 #line 1116 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3239 #line 1130 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32263240 { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
32273241 break;
32283242
32293243 case 84:
3230 #line 1117 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3244 #line 1131 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32313245 { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
32323246 break;
32333247
32343248 case 85:
3235 #line 1118 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3249 #line 1132 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32363250 { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
32373251 break;
32383252
32393253 case 86:
3240 #line 1121 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3254 #line 1135 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32413255 { (yyval.UIntVal) = CallingConv::C; ;}
32423256 break;
32433257
32443258 case 87:
3245 #line 1122 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3259 #line 1136 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32463260 { (yyval.UIntVal) = CallingConv::C; ;}
32473261 break;
32483262
32493263 case 88:
3250 #line 1123 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3264 #line 1137 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32513265 { (yyval.UIntVal) = CallingConv::Fast; ;}
32523266 break;
32533267
32543268 case 89:
3255 #line 1124 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3269 #line 1138 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32563270 { (yyval.UIntVal) = CallingConv::Cold; ;}
32573271 break;
32583272
32593273 case 90:
3260 #line 1125 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3274 #line 1139 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32613275 { (yyval.UIntVal) = CallingConv::X86_StdCall; ;}
32623276 break;
32633277
32643278 case 91:
3265 #line 1126 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3279 #line 1140 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32663280 { (yyval.UIntVal) = CallingConv::X86_FastCall; ;}
32673281 break;
32683282
32693283 case 92:
3270 #line 1127 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3284 #line 1141 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32713285 {
32723286 if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val))
32733287 GEN_ERROR("Calling conv too large");
32773291 break;
32783292
32793293 case 93:
3280 #line 1134 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3294 #line 1148 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32813295 { (yyval.ParamAttrs) = FunctionType::ZExtAttribute; ;}
32823296 break;
32833297
32843298 case 94:
3285 #line 1135 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3299 #line 1149 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32863300 { (yyval.ParamAttrs) = FunctionType::SExtAttribute; ;}
32873301 break;
32883302
32893303 case 95:
3290 #line 1136 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3304 #line 1150 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32913305 { (yyval.ParamAttrs) = FunctionType::InRegAttribute; ;}
32923306 break;
32933307
32943308 case 96:
3295 #line 1137 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3309 #line 1151 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
32963310 { (yyval.ParamAttrs) = FunctionType::StructRetAttribute; ;}
32973311 break;
32983312
32993313 case 97:
3300 #line 1140 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3314 #line 1154 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33013315 { (yyval.ParamAttrs) = FunctionType::NoAttributeSet; ;}
33023316 break;
33033317
33043318 case 98:
3305 #line 1141 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3319 #line 1155 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33063320 {
33073321 (yyval.ParamAttrs) = FunctionType::ParameterAttributes((yyvsp[-1].ParamAttrs) | (yyvsp[0].ParamAttrs));
33083322 ;}
33093323 break;
33103324
33113325 case 99:
3312 #line 1146 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3326 #line 1160 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33133327 { (yyval.ParamAttrs) = FunctionType::NoReturnAttribute; ;}
33143328 break;
33153329
33163330 case 101:
3317 #line 1150 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3331 #line 1164 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33183332 { (yyval.ParamAttrs) = FunctionType::NoAttributeSet; ;}
33193333 break;
33203334
33213335 case 102:
3322 #line 1151 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3336 #line 1165 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33233337 {
33243338 (yyval.ParamAttrs) = FunctionType::ParameterAttributes((yyvsp[-1].ParamAttrs) | (yyvsp[0].ParamAttrs));
33253339 ;}
33263340 break;
33273341
33283342 case 103:
3329 #line 1158 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3343 #line 1172 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33303344 { (yyval.UIntVal) = 0; ;}
33313345 break;
33323346
33333347 case 104:
3334 #line 1159 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3348 #line 1173 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33353349 {
33363350 (yyval.UIntVal) = (yyvsp[0].UInt64Val);
33373351 if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
33413355 break;
33423356
33433357 case 105:
3344 #line 1165 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3358 #line 1179 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33453359 { (yyval.UIntVal) = 0; ;}
33463360 break;
33473361
33483362 case 106:
3349 #line 1166 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3363 #line 1180 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33503364 {
33513365 (yyval.UIntVal) = (yyvsp[0].UInt64Val);
33523366 if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
33563370 break;
33573371
33583372 case 107:
3359 #line 1174 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3373 #line 1188 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33603374 {
33613375 for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i)
33623376 if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\')
33673381 break;
33683382
33693383 case 108:
3370 #line 1182 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3384 #line 1196 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33713385 { (yyval.StrVal) = 0; ;}
33723386 break;
33733387
33743388 case 109:
3375 #line 1183 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3389 #line 1197 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33763390 { (yyval.StrVal) = (yyvsp[0].StrVal); ;}
33773391 break;
33783392
33793393 case 110:
3380 #line 1188 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3394 #line 1202 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33813395 {;}
33823396 break;
33833397
33843398 case 111:
3385 #line 1189 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3399 #line 1203 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33863400 {;}
33873401 break;
33883402
33893403 case 112:
3390 #line 1190 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3404 #line 1204 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
33913405 {
33923406 CurGV->setSection((yyvsp[0].StrVal));
33933407 free((yyvsp[0].StrVal));
33963410 break;
33973411
33983412 case 113:
3399 #line 1195 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3413 #line 1209 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
34003414 {
34013415 if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val)))
34023416 GEN_ERROR("Alignment must be a power of two");
34063420 break;
34073421
34083422 case 118:
3409 #line 1211 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3423 #line 1225 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
34103424 {
34113425 (yyval.TypeVal) = new PATypeHolder(OpaqueType::get());
34123426 CHECK_FOR_ERROR
34143428 break;
34153429
34163430 case 119:
3417 #line 1215 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3431 #line 1229 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
34183432 {
34193433 (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType));
34203434 CHECK_FOR_ERROR
34223436 break;
34233437
34243438 case 120:
3425 #line 1219 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3439 #line 1233 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
34263440 { // Pointer type?
34273441 if (*(yyvsp[-1].TypeVal) == Type::LabelTy)
34283442 GEN_ERROR("Cannot form a pointer to a basic block");
34333447 break;
34343448
34353449 case 121:
3436 #line 1226 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3450 #line 1240 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
34373451 { // Named types are also simple types...
34383452 const Type* tmp = getTypeVal((yyvsp[0].ValIDVal));
34393453 CHECK_FOR_ERROR
34423456 break;
34433457
34443458 case 122:
3445 #line 1231 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3459 #line 1245 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
34463460 { // Type UpReference
34473461 if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range");
34483462 OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
34543468 break;
34553469
34563470 case 123:
3457 #line 1239 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3471 #line 1253 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
34583472 {
34593473 std::vector Params;
34603474 std::vector Attrs;
34763490 break;
34773491
34783492 case 124:
3479 #line 1257 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3493 #line 1271 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
34803494 {
34813495 std::vector Params;
34823496 std::vector Attrs;
34973511 break;
34983512
34993513 case 125:
3500 #line 1275 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3514 #line 1289 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35013515 { // Sized array type?
35023516 (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val))));
35033517 delete (yyvsp[-1].TypeVal);
35063520 break;
35073521
35083522 case 126:
3509 #line 1280 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3523 #line 1294 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35103524 { // Packed array type?
35113525 const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get();
35123526 if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val))
35223536 break;
35233537
35243538 case 127:
3525 #line 1292 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3539 #line 1306 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35263540 { // Structure type?
35273541 std::vector Elements;
35283542 for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(),
35363550 break;
35373551
35383552 case 128:
3539 #line 1302 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3553 #line 1316 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35403554 { // Empty structure type?
35413555 (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector()));
35423556 CHECK_FOR_ERROR
35443558 break;
35453559
35463560 case 129:
3547 #line 1306 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3561 #line 1320 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35483562 {
35493563 std::vector Elements;
35503564 for (std::list::iterator I = (yyvsp[-2].TypeList)->begin(),
35583572 break;
35593573
35603574 case 130:
3561 #line 1316 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3575 #line 1330 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35623576 { // Empty structure type?
35633577 (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true));
35643578 CHECK_FOR_ERROR
35663580 break;
35673581
35683582 case 131:
3569 #line 1323 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3583 #line 1337 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35703584 {
35713585 (yyval.TypeWithAttrs).Ty = (yyvsp[-1].TypeVal);
35723586 (yyval.TypeWithAttrs).Attrs = (yyvsp[0].ParamAttrs);
35743588 break;
35753589
35763590 case 132:
3577 #line 1330 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3591 #line 1344 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35783592 {
35793593 if (!UpRefs.empty())
35803594 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
35853599 break;
35863600
35873601 case 133:
3588 #line 1337 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3602 #line 1351 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35893603 {
35903604 (yyval.TypeVal) = new PATypeHolder(Type::VoidTy);
35913605 ;}
35923606 break;
35933607
35943608 case 134:
3595 #line 1342 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3609 #line 1356 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
35963610 {
35973611 (yyval.TypeWithAttrsList) = new TypeWithAttrsList();
35983612 (yyval.TypeWithAttrsList)->push_back((yyvsp[0].TypeWithAttrs));
36013615 break;
36023616
36033617 case 135:
3604 #line 1347 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3618 #line 1361 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
36053619 {
36063620 ((yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList))->push_back((yyvsp[0].TypeWithAttrs));
36073621 CHECK_FOR_ERROR
36093623 break;
36103624
36113625 case 137:
3612 #line 1355 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3626 #line 1369 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
36133627 {
36143628 (yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList);
36153629 TypeWithAttrs TWA; TWA.Attrs = FunctionType::NoAttributeSet;
36203634 break;
36213635
36223636 case 138:
3623 #line 1362 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3637 #line 1376 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
36243638 {
36253639 (yyval.TypeWithAttrsList) = new TypeWithAttrsList;
36263640 TypeWithAttrs TWA; TWA.Attrs = FunctionType::NoAttributeSet;
36313645 break;
36323646
36333647 case 139:
3634 #line 1369 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3648 #line 1383 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
36353649 {
36363650 (yyval.TypeWithAttrsList) = new TypeWithAttrsList();
36373651 CHECK_FOR_ERROR
36393653 break;
36403654
36413655 case 140:
3642 #line 1377 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3656 #line 1391 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
36433657 {
36443658 (yyval.TypeList) = new std::list();
36453659 (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal);
36483662 break;
36493663
36503664 case 141:
3651 #line 1382 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3665 #line 1396 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
36523666 {
36533667 ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal);
36543668 CHECK_FOR_ERROR
36563670 break;
36573671
36583672 case 142:
3659 #line 1393 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3673 #line 1407 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
36603674 { // Nonempty unsized arr
36613675 if (!UpRefs.empty())
36623676 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
36883702 break;
36893703
36903704 case 143:
3691 #line 1421 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3705 #line 1435 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
36923706 {
36933707 if (!UpRefs.empty())
36943708 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
37083722 break;
37093723
37103724 case 144:
3711 #line 1437 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3725 #line 1451 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
37123726 {
37133727 if (!UpRefs.empty())
37143728 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
37413755 break;
37423756
37433757 case 145:
3744 #line 1466 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3758 #line 1480 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
37453759 { // Nonempty unsized arr
37463760 if (!UpRefs.empty())
37473761 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
37733787 break;
37743788
37753789 case 146:
3776 #line 1494 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3790 #line 1508 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
37773791 {
37783792 const StructType *STy = dyn_cast((yyvsp[-3].TypeVal)->get());
37793793 if (STy == 0)
38023816 break;
38033817
38043818 case 147:
3805 #line 1519 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3819 #line 1533 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
38063820 {
38073821 if (!UpRefs.empty())
38083822 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
38253839 break;
38263840
38273841 case 148:
3828 #line 1538 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3842 #line 1552 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
38293843 {
38303844 const StructType *STy = dyn_cast((yyvsp[-5].TypeVal)->get());
38313845 if (STy == 0)
38543868 break;
38553869
38563870 case 149:
3857 #line 1563 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3871 #line 1577 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
38583872 {
38593873 if (!UpRefs.empty())
38603874 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription());
38773891 break;
38783892
38793893 case 150:
3880 #line 1582 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3894 #line 1596 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
38813895 {
38823896 if (!UpRefs.empty())
38833897 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
38933907 break;
38943908
38953909 case 151:
3896 #line 1594 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3910 #line 1608 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
38973911 {
38983912 if (!UpRefs.empty())
38993913 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
39043918 break;
39053919
39063920 case 152:
3907 #line 1601 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3921 #line 1615 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
39083922 {
39093923 if (!UpRefs.empty())
39103924 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
39743988 break;
39753989
39763990 case 153:
3977 #line 1667 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
3991 #line 1681 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
39783992 {
39793993 if (!UpRefs.empty())
39803994 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
39884002 break;
39894003
39904004 case 154:
3991 #line 1677 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4005 #line 1691 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
39924006 {
39934007 if (!UpRefs.empty())
39944008 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
40024016 break;
40034017
40044018 case 155:
4005 #line 1687 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4019 #line 1701 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
40064020 { // integral constants
40074021 if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val)))
40084022 GEN_ERROR("Constant value doesn't fit in type");
40124026 break;
40134027
40144028 case 156:
4015 #line 1693 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4029 #line 1707 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
40164030 { // integral constants
40174031 if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val)))
40184032 GEN_ERROR("Constant value doesn't fit in type");
40224036 break;
40234037
40244038 case 157:
4025 #line 1699 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4039 #line 1713 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
40264040 { // Boolean constants
40274041 assert(cast((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?");
40284042 (yyval.ConstVal) = ConstantInt::getTrue();
40314045 break;
40324046
40334047 case 158:
4034 #line 1704 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4048 #line 1718 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
40354049 { // Boolean constants
40364050 assert(cast((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?");
40374051 (yyval.ConstVal) = ConstantInt::getFalse();
40404054 break;
40414055
40424056 case 159:
4043 #line 1709 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4057 #line 1723 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
40444058 { // Float & Double constants
40454059 if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal)))
40464060 GEN_ERROR("Floating point constant invalid for type");
40504064 break;
40514065
40524066 case 160:
4053 #line 1717 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4067 #line 1731 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
40544068 {
40554069 if (!UpRefs.empty())
40564070 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
40664080 break;
40674081
40684082 case 161:
4069 #line 1729 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4083 #line 1743 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
40704084 {
40714085 if (!isa((yyvsp[-2].ConstVal)->getType()))
40724086 GEN_ERROR("GetElementPtr requires a pointer operand");
40914105 break;
40924106
40934107 case 162:
4094 #line 1750 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4108 #line 1764 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
40954109 {
40964110 if ((yyvsp[-5].ConstVal)->getType() != Type::Int1Ty)
40974111 GEN_ERROR("Select condition must be of boolean type");
41034117 break;
41044118
41054119 case 163:
4106 #line 1758 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4120 #line 1772 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41074121 {
41084122 if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
41094123 GEN_ERROR("Binary operator types must match");
41134127 break;
41144128
41154129 case 164:
4116 #line 1764 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4130 #line 1778 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41174131 {
41184132 if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
41194133 GEN_ERROR("Logical operator types must match");
41284142 break;
41294143
41304144 case 165:
4131 #line 1775 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4145 #line 1789 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41324146 {
41334147 if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
41344148 GEN_ERROR("icmp operand types must match");
41374151 break;
41384152
41394153 case 166:
4140 #line 1780 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4154 #line 1794 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41414155 {
41424156 if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
41434157 GEN_ERROR("fcmp operand types must match");
41464160 break;
41474161
41484162 case 167:
4149 #line 1785 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4163 #line 1799 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41504164 {
41514165 if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
41524166 GEN_ERROR("Invalid extractelement operands");
41564170 break;
41574171
41584172 case 168:
4159 #line 1791 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4173 #line 1805 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41604174 {
41614175 if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
41624176 GEN_ERROR("Invalid insertelement operands");
41664180 break;
41674181
41684182 case 169:
4169 #line 1797 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4183 #line 1811 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41704184 {
41714185 if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
41724186 GEN_ERROR("Invalid shufflevector operands");
41764190 break;
41774191
41784192 case 170:
4179 #line 1806 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4193 #line 1820 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41804194 {
41814195 ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal));
41824196 CHECK_FOR_ERROR
41844198 break;
41854199
41864200 case 171:
4187 #line 1810 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4201 #line 1824 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41884202 {
41894203 (yyval.ConstVector) = new std::vector();
41904204 (yyval.ConstVector)->push_back((yyvsp[0].ConstVal));
41934207 break;
41944208
41954209 case 172:
4196 #line 1818 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4210 #line 1832 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
41974211 { (yyval.BoolVal) = false; ;}
41984212 break;
41994213
42004214 case 173:
4201 #line 1818 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4215 #line 1832 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42024216 { (yyval.BoolVal) = true; ;}
42034217 break;
42044218
42054219 case 174:
4206 #line 1829 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4220 #line 1843 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42074221 {
42084222 (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
42094223 CurModule.ModuleDone();
42124226 break;
42134227
42144228 case 175:
4215 #line 1834 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4229 #line 1848 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42164230 {
42174231 (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
42184232 CurModule.ModuleDone();
42214235 break;
42224236
42234237 case 178:
4224 #line 1847 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4238 #line 1861 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42254239 { CurFun.isDeclare = false; ;}
42264240 break;
42274241
42284242 case 179:
4229 #line 1847 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4243 #line 1861 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42304244 {
42314245 CurFun.FunctionDone();
42324246 CHECK_FOR_ERROR
42344248 break;
42354249
42364250 case 180:
4237 #line 1851 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4251 #line 1865 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42384252 { CurFun.isDeclare = true; ;}
42394253 break;
42404254
42414255 case 181:
4242 #line 1851 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4256 #line 1865 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42434257 {
42444258 CHECK_FOR_ERROR
42454259 ;}
42464260 break;
42474261
42484262 case 182:
4249 #line 1854 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4263 #line 1868 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42504264 {
42514265 CHECK_FOR_ERROR
42524266 ;}
42534267 break;
42544268
42554269 case 183:
4256 #line 1857 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4270 #line 1871 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42574271 {
42584272 // Emit an error if there are any unresolved types left.
42594273 if (!CurModule.LateResolveTypes.empty()) {
42694283 break;
42704284
42714285 case 184:
4272 #line 1869 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4286 #line 1883 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
42734287 {
42744288 if (!UpRefs.empty())
42754289 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
42974311 break;
42984312
42994313 case 185:
4300 #line 1893 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4314 #line 1907 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43014315 {
43024316 ResolveTypeTo((yyvsp[-2].StrVal), (yyvsp[0].PrimType));
43034317
43124326 break;
43134327
43144328 case 186:
4315 #line 1904 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4329 #line 1918 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43164330 {
43174331 /* "Externally Visible" Linkage */
43184332 if ((yyvsp[0].ConstVal) == 0)
43244338 break;
43254339
43264340 case 187:
4327 #line 1911 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4341 #line 1925 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43284342 {
43294343 CurGV = 0;
43304344 ;}
43314345 break;
43324346
43334347 case 188:
4334 #line 1914 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4348 #line 1928 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43354349 {
43364350 if ((yyvsp[0].ConstVal) == 0)
43374351 GEN_ERROR("Global value initializer is not a constant");
43414355 break;
43424356
43434357 case 189:
4344 #line 1919 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4358 #line 1933 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43454359 {
43464360 CurGV = 0;
43474361 ;}
43484362 break;
43494363
43504364 case 190:
4351 #line 1922 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4365 #line 1936 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43524366 {
43534367 if (!UpRefs.empty())
43544368 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
43594373 break;
43604374
43614375 case 191:
4362 #line 1928 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4376 #line 1942 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43634377 {
43644378 CurGV = 0;
43654379 CHECK_FOR_ERROR
43674381 break;
43684382
43694383 case 192:
4370 #line 1932 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4384 #line 1946 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43714385 {
43724386 CHECK_FOR_ERROR
43734387 ;}
43744388 break;
43754389
43764390 case 193:
4377 #line 1935 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4391 #line 1949 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43784392 {
43794393 CHECK_FOR_ERROR
43804394 ;}
43814395 break;
43824396
43834397 case 194:
4384 #line 1941 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4398 #line 1955 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
43854399 {
43864400 const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
43874401 char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true);
43974411 break;
43984412
43994413 case 195:
4400 #line 1954 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4414 #line 1968 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44014415 {
44024416 CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal));
44034417 free((yyvsp[0].StrVal));
44054419 break;
44064420
44074421 case 196:
4408 #line 1958 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4422 #line 1972 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44094423 {
44104424 CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal));
44114425 free((yyvsp[0].StrVal));
44134427 break;
44144428
44154429 case 198:
4416 #line 1965 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4430 #line 1979 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44174431 {
44184432 CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
44194433 free((yyvsp[0].StrVal));
44224436 break;
44234437
44244438 case 199:
4425 #line 1970 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4439 #line 1984 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44264440 {
44274441 CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
44284442 free((yyvsp[0].StrVal));
44314445 break;
44324446
44334447 case 200:
4434 #line 1975 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4448 #line 1989 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44354449 {
44364450 CHECK_FOR_ERROR
44374451 ;}
44384452 break;
44394453
44404454 case 201:
4441 #line 1984 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4455 #line 1998 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44424456 {
44434457 if (!UpRefs.empty())
44444458 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
44524466 break;
44534467
44544468 case 202:
4455 #line 1994 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4469 #line 2008 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44564470 {
44574471 if (!UpRefs.empty())
44584472 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
44664480 break;
44674481
44684482 case 203:
4469 #line 2005 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4483 #line 2019 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44704484 {
44714485 (yyval.ArgList) = (yyvsp[0].ArgList);
44724486 CHECK_FOR_ERROR
44744488 break;
44754489
44764490 case 204:
4477 #line 2009 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4491 #line 2023 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44784492 {
44794493 (yyval.ArgList) = (yyvsp[-2].ArgList);
44804494 struct ArgListEntry E;
44874501 break;
44884502
44894503 case 205:
4490 #line 2018 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4504 #line 2032 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
44914505 {
44924506 (yyval.ArgList) = new ArgListType;
44934507 struct ArgListEntry E;
45004514 break;
45014515
45024516 case 206:
4503 #line 2027 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4517 #line 2041 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
45044518 {
45054519 (yyval.ArgList) = 0;
45064520 CHECK_FOR_ERROR
45084522 break;
45094523
45104524 case 207:
4511 #line 2033 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4525 #line 2047 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
45124526 {
45134527 UnEscapeLexed((yyvsp[-6].StrVal));
45144528 std::string FunctionName((yyvsp[-6].StrVal));
45574571 CurModule.CurrentModule->getFunctionList().remove(Fn);
45584572 CurModule.CurrentModule->getFunctionList().push_back(Fn);
45594573 } else if (!FunctionName.empty() && // Merge with an earlier prototype?
4560 (Fn = CurModule.CurrentModule->getFunction(FunctionName, FT))) {
4561 // If this is the case, either we need to be a forward decl, or it needs
4562 // to be.
4563 if (!CurFun.isDeclare && !Fn->isDeclaration())
4574 (Fn = CurModule.CurrentModule->getFunction(FunctionName))) {
4575 if (Fn->getFunctionType() != FT ) {
4576 // The existing function doesn't have the same type. This is an overload
4577 // error.
4578 GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
4579 } else if (!CurFun.isDeclare && !Fn->isDeclaration()) {
4580 // Neither the existing or the current function is a declaration and they
4581 // have the same name and same type. Clearly this is a redefinition.
45644582 GEN_ERROR("Redefinition of function '" + FunctionName + "'");
4565
4566 // Make sure to strip off any argument names so we can't get conflicts.
4567 if (Fn->isDeclaration())
4583 } if (Fn->isDeclaration()) {
4584 // Make sure to strip off any argument names so we can't get conflicts.
45684585 for (Function::arg_iterator AI = Fn->arg_begin(), AE = Fn->arg_end();
45694586 AI != AE; ++AI)
45704587 AI->setName("");
4588 }
45714589 } else { // Not already defined?
45724590 Fn = new Function(FT, GlobalValue::ExternalLinkage, FunctionName,
45734591 CurModule.CurrentModule);
45944612 // Add all of the arguments we parsed to the function...
45954613 if ((yyvsp[-4].ArgList)) { // Is null if empty...
45964614 if (isVarArg) { // Nuke the last entry
4597 assert((yyvsp[-4].ArgList)->back().Ty->get() == Type::VoidTy && (yyvsp[-4].ArgList)->back().Name == 0&&
4615 assert((yyvsp[-4].ArgList)->back().Ty->get() == Type::VoidTy && (yyvsp[-4].ArgList)->back().Name == 0 &&
45984616 "Not a varargs marker!");
45994617 delete (yyvsp[-4].ArgList)->back().Ty;
46004618 (yyvsp[-4].ArgList)->pop_back(); // Delete the last entry
46014619 }
46024620 Function::arg_iterator ArgIt = Fn->arg_begin();
4621 Function::arg_iterator ArgEnd = Fn->arg_end();
46034622 unsigned Idx = 1;
4604 for (ArgListType::iterator I = (yyvsp[-4].ArgList)->begin(); I != (yyvsp[-4].ArgList)->end(); ++I, ++ArgIt) {
4623 for (ArgListType::iterator I = (yyvsp[-4].ArgList)->begin();
4624 I != (yyvsp[-4].ArgList)->end() && ArgIt != ArgEnd; ++I, ++ArgIt) {
46054625 delete I->Ty; // Delete the typeholder...
4606 setValueName(ArgIt, I->Name); // Insert arg into symtab...
4626 setValueName(ArgIt, I->Name); // Insert arg into symtab...
46074627 CHECK_FOR_ERROR
46084628 InsertValue(ArgIt);
46094629 Idx++;
46164636 break;
46174637
46184638 case 210:
4619 #line 2140 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4639 #line 2160 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46204640 {
46214641 (yyval.FunctionVal) = CurFun.CurrentFunction;
46224642
46284648 break;
46294649
46304650 case 213:
4631 #line 2151 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4651 #line 2171 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46324652 {
46334653 (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
46344654 CHECK_FOR_ERROR
46364656 break;
46374657
46384658 case 214:
4639 #line 2156 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4659 #line 2176 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46404660 {
46414661 CurFun.CurrentFunction->setLinkage((yyvsp[-2].Linkage));
46424662 CurFun.CurrentFunction->setVisibility((yyvsp[-1].Visibility));
46474667 break;
46484668
46494669 case 215:
4650 #line 2168 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4670 #line 2188 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46514671 {
46524672 (yyval.BoolVal) = false;
46534673 CHECK_FOR_ERROR
46554675 break;
46564676
46574677 case 216:
4658 #line 2172 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4678 #line 2192 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46594679 {
46604680 (yyval.BoolVal) = true;
46614681 CHECK_FOR_ERROR
46634683 break;
46644684
46654685 case 217:
4666 #line 2177 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4686 #line 2197 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46674687 { // A reference to a direct constant
46684688 (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val));
46694689 CHECK_FOR_ERROR
46714691 break;
46724692
46734693 case 218:
4674 #line 2181 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4694 #line 2201 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46754695 {
46764696 (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val));
46774697 CHECK_FOR_ERROR
46794699 break;
46804700
46814701 case 219:
4682 #line 2185 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4702 #line 2205 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46834703 { // Perhaps it's an FP constant?
46844704 (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal));
46854705 CHECK_FOR_ERROR
46874707 break;
46884708
46894709 case 220:
4690 #line 2189 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4710 #line 2209 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46914711 {
46924712 (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue());
46934713 CHECK_FOR_ERROR
46954715 break;
46964716
46974717 case 221:
4698 #line 2193 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4718 #line 2213 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
46994719 {
47004720 (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse());
47014721 CHECK_FOR_ERROR
47034723 break;
47044724
47054725 case 222:
4706 #line 2197 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4726 #line 2217 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47074727 {
47084728 (yyval.ValIDVal) = ValID::createNull();
47094729 CHECK_FOR_ERROR
47114731 break;
47124732
47134733 case 223:
4714 #line 2201 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4734 #line 2221 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47154735 {
47164736 (yyval.ValIDVal) = ValID::createUndef();
47174737 CHECK_FOR_ERROR
47194739 break;
47204740
47214741 case 224:
4722 #line 2205 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4742 #line 2225 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47234743 { // A vector zero constant.
47244744 (yyval.ValIDVal) = ValID::createZeroInit();
47254745 CHECK_FOR_ERROR
47274747 break;
47284748
47294749 case 225:
4730 #line 2209 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4750 #line 2229 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47314751 { // Nonempty unsized packed vector
47324752 const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType();
47334753 int NumElements = (yyvsp[-1].ConstVector)->size();
47564776 break;
47574777
47584778 case 226:
4759 #line 2234 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4779 #line 2254 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47604780 {
47614781 (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal));
47624782 CHECK_FOR_ERROR
47644784 break;
47654785
47664786 case 227:
4767 #line 2238 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4787 #line 2258 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47684788 {
47694789 char *End = UnEscapeLexed((yyvsp[-2].StrVal), true);
47704790 std::string AsmStr = std::string((yyvsp[-2].StrVal), End);
47784798 break;
47794799
47804800 case 228:
4781 #line 2252 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4801 #line 2272 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47824802 { // Is it an integer reference...?
47834803 (yyval.ValIDVal) = ValID::createLocalID((yyvsp[0].UIntVal));
47844804 CHECK_FOR_ERROR
47864806 break;
47874807
47884808 case 229:
4789 #line 2256 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4809 #line 2276 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47904810 {
47914811 (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[0].UIntVal));
47924812 CHECK_FOR_ERROR
47944814 break;
47954815
47964816 case 230:
4797 #line 2260 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4817 #line 2280 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
47984818 { // Is it a named reference...?
47994819 (yyval.ValIDVal) = ValID::createLocalName((yyvsp[0].StrVal));
48004820 CHECK_FOR_ERROR
48024822 break;
48034823
48044824 case 231:
4805 #line 2264 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4825 #line 2284 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
48064826 { // Is it a named reference...?
48074827 (yyval.ValIDVal) = ValID::createGlobalName((yyvsp[0].StrVal));
48084828 CHECK_FOR_ERROR
48104830 break;
48114831
48124832 case 234:
4813 #line 2276 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4833 #line 2296 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
48144834 {
48154835 if (!UpRefs.empty())
48164836 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
48214841 break;
48224842
48234843 case 235:
4824 #line 2285 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4844 #line 2305 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
48254845 {
48264846 (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
48274847 CHECK_FOR_ERROR
48294849 break;
48304850
48314851 case 236:
4832 #line 2289 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4852 #line 2309 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
48334853 { // Do not allow functions with 0 basic blocks
48344854 (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
48354855 CHECK_FOR_ERROR
48374857 break;
48384858
48394859 case 237:
4840 #line 2298 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4860 #line 2318 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
48414861 {
48424862 setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal));
48434863 CHECK_FOR_ERROR
48444864 InsertValue((yyvsp[0].TermInstVal));
4845
48464865 (yyvsp[-2].BasicBlockVal)->getInstList().push_back((yyvsp[0].TermInstVal));
48474866 InsertValue((yyvsp[-2].BasicBlockVal));
48484867 (yyval.BasicBlockVal) = (yyvsp[-2].BasicBlockVal);
48514870 break;
48524871
48534872 case 238:
4854 #line 2309 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4873 #line 2328 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
48554874 {
48564875 if (CastInst *CI1 = dyn_cast((yyvsp[0].InstVal)))
48574876 if (CastInst *CI2 = dyn_cast(CI1->getOperand(0)))
48644883 break;
48654884
48664885 case 239:
4867 #line 2318 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4886 #line 2337 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
48684887 {
48694888 (yyval.BasicBlockVal) = getBBVal(ValID::createLocalID(CurFun.NextBBNum++), true);
48704889 CHECK_FOR_ERROR
48804899 break;
48814900
48824901 case 240:
4883 #line 2330 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4902 #line 2349 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
48844903 {
48854904 (yyval.BasicBlockVal) = getBBVal(ValID::createLocalName((yyvsp[0].StrVal)), true);
48864905 CHECK_FOR_ERROR
48964915 break;
48974916
48984917 case 241:
4899 #line 2343 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4918 #line 2362 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
49004919 { // Return with a result...
49014920 (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal));
49024921 CHECK_FOR_ERROR
49044923 break;
49054924
49064925 case 242:
4907 #line 2347 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4926 #line 2366 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
49084927 { // Return with no result...
49094928 (yyval.TermInstVal) = new ReturnInst();
49104929 CHECK_FOR_ERROR
49124931 break;
49134932
49144933 case 243:
4915 #line 2351 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4934 #line 2370 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
49164935 { // Unconditional Branch...
49174936 BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
49184937 CHECK_FOR_ERROR
49214940 break;
49224941
49234942 case 244:
4924 #line 2356 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4943 #line 2375 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
49254944 {
49264945 assert(cast((yyvsp[-7].PrimType))->getBitWidth() == 1 && "Not Bool?");
49274946 BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal));
49354954 break;
49364955
49374956 case 245:
4938 #line 2366 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4957 #line 2385 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
49394958 {
49404959 Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal));
49414960 CHECK_FOR_ERROR
49584977 break;
49594978
49604979 case 246:
4961 #line 2385 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4980 #line 2404 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
49624981 {
49634982 Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal));
49644983 CHECK_FOR_ERROR
49714990 break;
49724991
49734992 case 247:
4974 #line 2395 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
4993 #line 2414 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
49754994 {
49764995
49774996 // Handle the short syntax
50415060 break;
50425061
50435062 case 248:
5044 #line 2461 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5063 #line 2480 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
50455064 {
50465065 (yyval.TermInstVal) = new UnwindInst();
50475066 CHECK_FOR_ERROR
50495068 break;
50505069
50515070 case 249:
5052 #line 2465 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5071 #line 2484 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
50535072 {
50545073 (yyval.TermInstVal) = new UnreachableInst();
50555074 CHECK_FOR_ERROR
50575076 break;
50585077
50595078 case 250:
5060 #line 2472 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5079 #line 2491 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
50615080 {
50625081 (yyval.JumpTable) = (yyvsp[-5].JumpTable);
50635082 Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal)));
50725091 break;
50735092
50745093 case 251:
5075 #line 2483 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5094 #line 2502 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
50765095 {
50775096 (yyval.JumpTable) = new std::vector >();
50785097 Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal)));
50885107 break;
50895108
50905109 case 252:
5091 #line 2496 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5092 {
5093 // Is this definition named?? if so, assign the name...
5094 setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal));
5095 CHECK_FOR_ERROR
5096 InsertValue((yyvsp[0].InstVal));
5097 (yyval.InstVal) = (yyvsp[0].InstVal);
5098 CHECK_FOR_ERROR
5099 ;}
5110 #line 2515 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
5111 {
5112 // Is this definition named?? if so, assign the name...
5113 setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal));
5114 CHECK_FOR_ERROR
5115 InsertValue((yyvsp[0].InstVal));
5116 (yyval.InstVal) = (yyvsp[0].InstVal);
5117 CHECK_FOR_ERROR
5118 ;}
51005119 break;
51015120
51025121 case 253:
5103 #line 2505 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5122 #line 2525 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
51045123 { // Used for PHI nodes
51055124 if (!UpRefs.empty())
51065125 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-5].TypeVal))->getDescription());
51155134 break;
51165135
51175136 case 254:
5118 #line 2516 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5137 #line 2536 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
51195138 {
51205139 (yyval.PHIList) = (yyvsp[-6].PHIList);
51215140 Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal));
51275146 break;
51285147
51295148 case 255:
5130 #line 2526 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5149 #line 2546 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
51315150 {
51325151 if (!UpRefs.empty())
51335152 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
51395158 break;
51405159
51415160 case 256:
5142 #line 2534 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
5161 #line 2554 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
51435162 {
51445163 if (!UpRefs.empty())
51455164 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
51515170 break;