llvm.org GIT mirror llvm / 0598866
Large mechanical patch. s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 11 years ago
53 changed file(s) with 1248 addition(s) and 1249 deletion(s). Raw diff Collapse all Expand all
5959 /// its containing function.
6060 bool hasStructRetAttr() const;
6161
62 /// addAttr - Add a ParamAttr to an argument
62 /// addAttr - Add a Attribute to an argument
6363 void addAttr(Attributes);
6464
65 /// removeAttr - Remove a ParamAttr from an argument
65 /// removeAttr - Remove a Attribute from an argument
6666 void removeAttr(Attributes);
6767
6868 /// classof - Methods for support type inquiry through isa, cast, and
None //===-- llvm/Attributes.h - Container for ParamAttrs ---*---------- C++ -*-===//
0 //===-- llvm/Attributes.h - Container for Attributes ---*---------- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
66 //
77 //===----------------------------------------------------------------------===//
88 //
9 // This file contains the simple types necessary to represent the parameter
9 // This file contains the simple types necessary to represent the
1010 // attributes associated with functions and their calls.
1111 //
1212 //===----------------------------------------------------------------------===//
1313
14 #ifndef LLVM_PARAMETER_ATTRIBUTES_H
15 #define LLVM_PARAMETER_ATTRIBUTES_H
14 #ifndef LLVM_ATTRIBUTES_H
15 #define LLVM_ATTRIBUTES_H
1616
1717 #include
1818
1919 namespace llvm {
2020 class Type;
2121
22 /// Attributes - A bitset of attributes for a parameter.
22 /// Attributes - A bitset of attributes.
2323 typedef unsigned Attributes;
2424
25 namespace ParamAttr {
25 namespace Attribute {
2626
2727 /// Function parameters and results can have attributes to indicate how they
2828 /// should be treated by optimizations and code generation. This enumeration
29 /// lists the attributes that can be associated with parameters or function
30 /// results.
31 /// @brief Function parameter attributes.
29 /// lists the attributes that can be associated with parameters, function
30 /// results or the function itself.
31 /// @brief Function attributes.
3232
3333 const Attributes None = 0; ///< No attributes have been set
3434 const Attributes ZExt = 1<<0; ///< Zero extended before/after call
4242 const Attributes Nest = 1<<8; ///< Nested function static chain
4343 const Attributes ReadNone = 1<<9; ///< Function does not access memory
4444 const Attributes ReadOnly = 1<<10; ///< Function only reads from memory
45 const Attributes NoInline = 1<<11; // inline=never
46 const Attributes AlwaysInline = 1<<12; // inline=always
47 const Attributes OptimizeForSize = 1<<13; // opt_size
4548 const Attributes Alignment = 0xffff<<16; ///< Alignment of parameter (16 bits)
4649 // 0 = unknown, else in clear (not log)
4750
7376 /// The set of Attributes set in Attributes is converted to a
7477 /// string of equivalent mnemonics. This is, presumably, for writing out
7578 /// the mnemonics for the assembly writer.
76 /// @brief Convert parameter attribute bits to text
79 /// @brief Convert attribute bits to text
7780 std::string getAsString(Attributes Attrs);
78 } // end namespace ParamAttr
79
80 namespace FnAttr {
81 /// Function notes are implemented as attributes stored at index ~0 in
82 /// parameter attribute list.
83 const Attributes None = 0;
84 const Attributes NoInline = 1<<0; // inline=never
85 const Attributes AlwaysInline = 1<<1; // inline=always
86 const Attributes OptimizeForSize = 1<<2; // opt_size
87 } // end namespace FnAttr
88
89 /// This is just a pair of values to associate a set of parameter attributes
90 /// with a parameter index.
91 struct FnAttributeWithIndex {
81 } // end namespace Attribute
82
83 namespace Attribute {
84 } // end namespace Attribute
85
86 /// This is just a pair of values to associate a set of attributes
87 /// with an index.
88 struct AttributeWithIndex {
9289 Attributes Attrs; ///< The attributes that are set, or'd together.
9390 unsigned Index; ///< Index of the parameter for which the attributes apply.
94
95 static FnAttributeWithIndex get(unsigned Idx, Attributes Attrs) {
96 FnAttributeWithIndex P;
91 ///< Index 0 is used for return value attributes.
92 ///< Index ~0U is used for function attributes.
93
94 static AttributeWithIndex get(unsigned Idx, Attributes Attrs) {
95 AttributeWithIndex P;
9796 P.Index = Idx;
9897 P.Attrs = Attrs;
9998 return P;
101100 };
102101
103102 //===----------------------------------------------------------------------===//
104 // PAListPtr Smart Pointer
103 // AttrListPtr Smart Pointer
105104 //===----------------------------------------------------------------------===//
106105
107106 class AttributeListImpl;
108107
109 /// PAListPtr - This class manages the ref count for the opaque
108 /// AttrListPtr - This class manages the ref count for the opaque
110109 /// AttributeListImpl object and provides accessors for it.
111 class PAListPtr {
112 /// PAList - The parameter attributes that we are managing. This can be null
113 /// to represent the empty parameter attributes list.
114 AttributeListImpl *PAList;
110 class AttrListPtr {
111 /// AttrList - The attributes that we are managing. This can be null
112 /// to represent the empty attributes list.
113 AttributeListImpl *AttrList;
115114 public:
116 PAListPtr() : PAList(0) {}
117 PAListPtr(const PAListPtr &P);
118 const PAListPtr &operator=(const PAListPtr &RHS);
119 ~PAListPtr();
120
121 //===--------------------------------------------------------------------===//
122 // Parameter Attribute List Construction and Mutation
123 //===--------------------------------------------------------------------===//
124
125 /// get - Return a ParamAttrs list with the specified parameter in it.
126 static PAListPtr get(const FnAttributeWithIndex *Attr, unsigned NumAttrs);
127
128 /// get - Return a ParamAttr list with the parameters specified by the
115 AttrListPtr() : AttrList(0) {}
116 AttrListPtr(const AttrListPtr &P);
117 const AttrListPtr &operator=(const AttrListPtr &RHS);
118 ~AttrListPtr();
119
120 //===--------------------------------------------------------------------===//
121 // Attribute List Construction and Mutation
122 //===--------------------------------------------------------------------===//
123
124 /// get - Return a Attributes list with the specified parameter in it.
125 static AttrListPtr get(const AttributeWithIndex *Attr, unsigned NumAttrs);
126
127 /// get - Return a Attribute list with the parameters specified by the
129128 /// consecutive random access iterator range.
130129 template
131 static PAListPtr get(const Iter &I, const Iter &E) {
132 if (I == E) return PAListPtr(); // Empty list.
130 static AttrListPtr get(const Iter &I, const Iter &E) {
131 if (I == E) return AttrListPtr(); // Empty list.
133132 return get(&*I, static_cast(E-I));
134133 }
135134
136135 /// addAttr - Add the specified attribute at the specified index to this
137 /// attribute list. Since parameter attribute lists are immutable, this
136 /// attribute list. Since attribute lists are immutable, this
138137 /// returns the new list.
139 PAListPtr addAttr(unsigned Idx, Attributes Attrs) const;
138 AttrListPtr addAttr(unsigned Idx, Attributes Attrs) const;
140139
141140 /// removeAttr - Remove the specified attribute at the specified index from
142 /// this attribute list. Since parameter attribute lists are immutable, this
141 /// this attribute list. Since attribute lists are immutable, this
143142 /// returns the new list.
144 PAListPtr removeAttr(unsigned Idx, Attributes Attrs) const;
145
146 //===--------------------------------------------------------------------===//
147 // Parameter Attribute List Accessors
148 //===--------------------------------------------------------------------===//
149
150 /// getParamAttrs - The parameter attributes for the specified parameter are
151 /// returned. Parameters for the result are denoted with Idx = 0.
152 Attributes getParamAttrs(unsigned Idx) const;
143 AttrListPtr removeAttr(unsigned Idx, Attributes Attrs) const;
144
145 //===--------------------------------------------------------------------===//
146 // Attribute List Accessors
147 //===--------------------------------------------------------------------===//
148
149 /// getAttributes - The attributes for the specified index are
150 /// returned. Attributes for the result are denoted with Idx = 0.
151 Attributes getAttributes(unsigned Idx) const;
153152
154153 /// paramHasAttr - Return true if the specified parameter index has the
155154 /// specified attribute set.
156155 bool paramHasAttr(unsigned Idx, Attributes Attr) const {
157 return getParamAttrs(Idx) & Attr;
156 return getAttributes(Idx) & Attr;
158157 }
159158
160159 /// getParamAlignment - Return the alignment for the specified function
161160 /// parameter.
162161 unsigned getParamAlignment(unsigned Idx) const {
163 return (getParamAttrs(Idx) & ParamAttr::Alignment) >> 16;
162 return (getAttributes(Idx) & Attribute::Alignment) >> 16;
164163 }
165164
166165 /// hasAttrSomewhere - Return true if the specified attribute is set for at
168167 bool hasAttrSomewhere(Attributes Attr) const;
169168
170169 /// operator==/!= - Provide equality predicates.
171 bool operator==(const PAListPtr &RHS) const { return PAList == RHS.PAList; }
172 bool operator!=(const PAListPtr &RHS) const { return PAList != RHS.PAList; }
170 bool operator==(const AttrListPtr &RHS) const { return AttrList == RHS.AttrList; }
171 bool operator!=(const AttrListPtr &RHS) const { return AttrList != RHS.AttrList; }
173172
174173 void dump() const;
175174
176175 //===--------------------------------------------------------------------===//
177 // Parameter Attribute List Introspection
176 // Attribute List Introspection
178177 //===--------------------------------------------------------------------===//
179178
180179 /// getRawPointer - Return a raw pointer that uniquely identifies this
181 /// parameter attribute list.
180 /// attribute list.
182181 void *getRawPointer() const {
183 return PAList;
184 }
185
186 // Parameter attributes are stored as a dense set of slots, where there is one
182 return AttrList;
183 }
184
185 // Attributes are stored as a dense set of slots, where there is one
187186 // slot for each argument that has an attribute. This allows walking over the
188187 // dense set instead of walking the sparse list of attributes.
189188
190 /// isEmpty - Return true if no parameters have an attribute.
189 /// isEmpty - Return true if there are no attributes.
191190 ///
192191 bool isEmpty() const {
193 return PAList == 0;
192 return AttrList == 0;
194193 }
195194
196195 /// getNumSlots - Return the number of slots used in this attribute list.
198197 /// (including the function itself).
199198 unsigned getNumSlots() const;
200199
201 /// getSlot - Return the FnAttributeWithIndex at the specified slot. This
202 /// holds a parameter number plus a set of attributes.
203 const FnAttributeWithIndex &getSlot(unsigned Slot) const;
200 /// getSlot - Return the AttributeWithIndex at the specified slot. This
201 /// holds a index number plus a set of attributes.
202 const AttributeWithIndex &getSlot(unsigned Slot) const;
204203
205204 private:
206 explicit PAListPtr(AttributeListImpl *L);
205 explicit AttrListPtr(AttributeListImpl *L);
207206 };
208207
209208 } // End llvm namespace
6363 };
6464
6565 /// PARAMATTR blocks have code for defining a parameter attribute set.
66 enum ParamAttrCodes {
66 enum AttributeCodes {
6767 PARAMATTR_CODE_ENTRY = 1 // ENTRY: [paramidx0, attr0, paramidx1, attr1...]
6868 };
6969
6868 BasicBlockListType BasicBlocks; ///< The basic blocks
6969 mutable ArgumentListType ArgumentList; ///< The formal arguments
7070 ValueSymbolTable *SymTab; ///< Symbol table of args/instructions
71 PAListPtr ParamAttrs; ///< Parameter attributes
71 AttrListPtr AttributeList; ///< Parameter attributes
7272
7373 // The Calling Convention is stored in Value::SubclassData.
7474 /*unsigned CallingConvention;*/
139139 SubclassData = (SubclassData & 1) | (CC << 1);
140140 }
141141
142 /// getParamAttrs - Return the parameter attributes for this Function.
143 ///
144 const PAListPtr &getParamAttrs() const { return ParamAttrs; }
145
146 /// setParamAttrs - Set the parameter attributes for this Function.
147 ///
148 void setParamAttrs(const PAListPtr &attrs) { ParamAttrs = attrs; }
142 /// getAttributes - Return the parameter attributes for this Function.
143 ///
144 const AttrListPtr &getAttributes() const { return AttributeList; }
145
146 /// setAttributes - Set the parameter attributes for this Function.
147 ///
148 void setAttributes(const AttrListPtr &attrs) { AttributeList = attrs; }
149149
150150
151151 /// hasNote - Return true if this function has given note.
158158 ///
159159 void setNotes(const Attributes N) {
160160 // Notes are stored at ~0 index in parameter attribute list
161 addParamAttr(~0, N);
161 addAttribute(~0, N);
162162 }
163163
164164 /// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm
170170
171171 /// @brief Determine whether the function has the given attribute.
172172 bool paramHasAttr(unsigned i, Attributes attr) const {
173 return ParamAttrs.paramHasAttr(i, attr);
174 }
175
176 /// addParamAttr - adds the attribute to the list of attributes.
177 void addParamAttr(unsigned i, Attributes attr);
173 return AttributeList.paramHasAttr(i, attr);
174 }
175
176 /// addAttribute - adds the attribute to the list of attributes.
177 void addAttribute(unsigned i, Attributes attr);
178178
179 /// removeParamAttr - removes the attribute from the list of attributes.
180 void removeParamAttr(unsigned i, Attributes attr);
179 /// removeAttribute - removes the attribute from the list of attributes.
180 void removeAttribute(unsigned i, Attributes attr);
181181
182182 /// @brief Extract the alignment for a call or parameter (0=unknown).
183183 unsigned getParamAlignment(unsigned i) const {
184 return ParamAttrs.getParamAlignment(i);
184 return AttributeList.getParamAlignment(i);
185185 }
186186
187187 /// @brief Determine if the function does not access memory.
188188 bool doesNotAccessMemory() const {
189 return paramHasAttr(0, ParamAttr::ReadNone);
189 return paramHasAttr(0, Attribute::ReadNone);
190190 }
191191 void setDoesNotAccessMemory(bool DoesNotAccessMemory = true) {
192 if (DoesNotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
193 else removeParamAttr(0, ParamAttr::ReadNone);
192 if (DoesNotAccessMemory) addAttribute(0, Attribute::ReadNone);
193 else removeAttribute(0, Attribute::ReadNone);
194194 }
195195
196196 /// @brief Determine if the function does not access or only reads memory.
197197 bool onlyReadsMemory() const {
198 return doesNotAccessMemory() || paramHasAttr(0, ParamAttr::ReadOnly);
198 return doesNotAccessMemory() || paramHasAttr(0, Attribute::ReadOnly);
199199 }
200200 void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
201 if (OnlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
202 else removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
201 if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
202 else removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
203203 }
204204
205205 /// @brief Determine if the function cannot return.
206206 bool doesNotReturn() const {
207 return paramHasAttr(0, ParamAttr::NoReturn);
207 return paramHasAttr(0, Attribute::NoReturn);
208208 }
209209 void setDoesNotReturn(bool DoesNotReturn = true) {
210 if (DoesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
211 else removeParamAttr(0, ParamAttr::NoReturn);
210 if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
211 else removeAttribute(0, Attribute::NoReturn);
212212 }
213213
214214 /// @brief Determine if the function cannot unwind.
215215 bool doesNotThrow() const {
216 return paramHasAttr(0, ParamAttr::NoUnwind);
216 return paramHasAttr(0, Attribute::NoUnwind);
217217 }
218218 void setDoesNotThrow(bool DoesNotThrow = true) {
219 if (DoesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
220 else removeParamAttr(0, ParamAttr::NoUnwind);
219 if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
220 else removeAttribute(0, Attribute::NoUnwind);
221221 }
222222
223223 /// @brief Determine if the function returns a structure through first
224224 /// pointer argument.
225225 bool hasStructRetAttr() const {
226 return paramHasAttr(1, ParamAttr::StructRet);
226 return paramHasAttr(1, Attribute::StructRet);
227227 }
228228
229229 /// copyAttributesFrom - copy all additional attributes (those not needed to
972972 ///
973973
974974 class CallInst : public Instruction {
975 PAListPtr ParamAttrs; ///< parameter attributes for call
975 AttrListPtr AttributeList; ///< parameter attributes for call
976976 CallInst(const CallInst &CI);
977977 void init(Value *Func, Value* const *Params, unsigned NumParams);
978978 void init(Value *Func, Value *Actual1, Value *Actual2);
10721072 SubclassData = (SubclassData & 1) | (CC << 1);
10731073 }
10741074
1075 /// getParamAttrs - Return the parameter attributes for this call.
1076 ///
1077 const PAListPtr &getParamAttrs() const { return ParamAttrs; }
1078
1079 /// setParamAttrs - Sets the parameter attributes for this call.
1080 void setParamAttrs(const PAListPtr &Attrs) { ParamAttrs = Attrs; }
1075 /// getAttributes - Return the parameter attributes for this call.
1076 ///
1077 const AttrListPtr &getAttributes() const { return AttributeList; }
1078
1079 /// setAttributes - Sets the parameter attributes for this call.
1080 void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; }
10811081
1082 /// addParamAttr - adds the attribute to the list of attributes.
1083 void addParamAttr(unsigned i, Attributes attr);
1084
1085 /// removeParamAttr - removes the attribute from the list of attributes.
1086 void removeParamAttr(unsigned i, Attributes attr);
1082 /// addAttribute - adds the attribute to the list of attributes.
1083 void addAttribute(unsigned i, Attributes attr);
1084
1085 /// removeAttribute - removes the attribute from the list of attributes.
1086 void removeAttribute(unsigned i, Attributes attr);
10871087
10881088 /// @brief Determine whether the call or the callee has the given attribute.
10891089 bool paramHasAttr(unsigned i, unsigned attr) const;
10901090
10911091 /// @brief Extract the alignment for a call or parameter (0=unknown).
10921092 unsigned getParamAlignment(unsigned i) const {
1093 return ParamAttrs.getParamAlignment(i);
1093 return AttributeList.getParamAlignment(i);
10941094 }
10951095
10961096 /// @brief Determine if the call does not access memory.
10971097 bool doesNotAccessMemory() const {
1098 return paramHasAttr(0, ParamAttr::ReadNone);
1098 return paramHasAttr(0, Attribute::ReadNone);
10991099 }
11001100 void setDoesNotAccessMemory(bool NotAccessMemory = true) {
1101 if (NotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
1102 else removeParamAttr(0, ParamAttr::ReadNone);
1101 if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
1102 else removeAttribute(0, Attribute::ReadNone);
11031103 }
11041104
11051105 /// @brief Determine if the call does not access or only reads memory.
11061106 bool onlyReadsMemory() const {
1107 return doesNotAccessMemory() || paramHasAttr(0, ParamAttr::ReadOnly);
1107 return doesNotAccessMemory() || paramHasAttr(0, Attribute::ReadOnly);
11081108 }
11091109 void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
1110 if (OnlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
1111 else removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
1110 if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
1111 else removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
11121112 }
11131113
11141114 /// @brief Determine if the call cannot return.
11151115 bool doesNotReturn() const {
1116 return paramHasAttr(0, ParamAttr::NoReturn);
1116 return paramHasAttr(0, Attribute::NoReturn);
11171117 }
11181118 void setDoesNotReturn(bool DoesNotReturn = true) {
1119 if (DoesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
1120 else removeParamAttr(0, ParamAttr::NoReturn);
1119 if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
1120 else removeAttribute(0, Attribute::NoReturn);
11211121 }
11221122
11231123 /// @brief Determine if the call cannot unwind.
11241124 bool doesNotThrow() const {
1125 return paramHasAttr(0, ParamAttr::NoUnwind);
1125 return paramHasAttr(0, Attribute::NoUnwind);
11261126 }
11271127 void setDoesNotThrow(bool DoesNotThrow = true) {
1128 if (DoesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
1129 else removeParamAttr(0, ParamAttr::NoUnwind);
1128 if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
1129 else removeAttribute(0, Attribute::NoUnwind);
11301130 }
11311131
11321132 /// @brief Determine if the call returns a structure through first
11331133 /// pointer argument.
11341134 bool hasStructRetAttr() const {
11351135 // Be friendly and also check the callee.
1136 return paramHasAttr(1, ParamAttr::StructRet);
1136 return paramHasAttr(1, Attribute::StructRet);
11371137 }
11381138
11391139 /// @brief Determine if any call argument is an aggregate passed by value.
11401140 bool hasByValArgument() const {
1141 return ParamAttrs.hasAttrSomewhere(ParamAttr::ByVal);
1141 return AttributeList.hasAttrSomewhere(Attribute::ByVal);
11421142 }
11431143
11441144 /// getCalledFunction - Return the function being called by this instruction
23522352 /// calling convention of the call.
23532353 ///
23542354 class InvokeInst : public TerminatorInst {
2355 PAListPtr ParamAttrs;
2355 AttrListPtr AttributeList;
23562356 InvokeInst(const InvokeInst &BI);
23572357 void init(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
23582358 Value* const *Args, unsigned NumArgs);
24302430 SubclassData = CC;
24312431 }
24322432
2433 /// getParamAttrs - Return the parameter attributes for this invoke.
2434 ///
2435 const PAListPtr &getParamAttrs() const { return ParamAttrs; }
2436
2437 /// setParamAttrs - Set the parameter attributes for this invoke.
2438 ///
2439 void setParamAttrs(const PAListPtr &Attrs) { ParamAttrs = Attrs; }
2433 /// getAttributes - Return the parameter attributes for this invoke.
2434 ///
2435 const AttrListPtr &getAttributes() const { return AttributeList; }
2436
2437 /// setAttributes - Set the parameter attributes for this invoke.
2438 ///
2439 void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; }
24402440
24412441 /// @brief Determine whether the call or the callee has the given attribute.
24422442 bool paramHasAttr(unsigned i, Attributes attr) const;
24432443
2444 /// addParamAttr - adds the attribute to the list of attributes.
2445 void addParamAttr(unsigned i, Attributes attr);
2446
2447 /// removeParamAttr - removes the attribute from the list of attributes.
2448 void removeParamAttr(unsigned i, Attributes attr);
2444 /// addAttribute - adds the attribute to the list of attributes.
2445 void addAttribute(unsigned i, Attributes attr);
2446
2447 /// removeAttribute - removes the attribute from the list of attributes.
2448 void removeAttribute(unsigned i, Attributes attr);
24492449
24502450 /// @brief Extract the alignment for a call or parameter (0=unknown).
24512451 unsigned getParamAlignment(unsigned i) const {
2452 return ParamAttrs.getParamAlignment(i);
2452 return AttributeList.getParamAlignment(i);
24532453 }
24542454
24552455 /// @brief Determine if the call does not access memory.
24562456 bool doesNotAccessMemory() const {
2457 return paramHasAttr(0, ParamAttr::ReadNone);
2457 return paramHasAttr(0, Attribute::ReadNone);
24582458 }
24592459 void setDoesNotAccessMemory(bool NotAccessMemory = true) {
2460 if (NotAccessMemory) addParamAttr(0, ParamAttr::ReadNone);
2461 else removeParamAttr(0, ParamAttr::ReadNone);
2460 if (NotAccessMemory) addAttribute(0, Attribute::ReadNone);
2461 else removeAttribute(0, Attribute::ReadNone);
24622462 }
24632463
24642464 /// @brief Determine if the call does not access or only reads memory.
24652465 bool onlyReadsMemory() const {
2466 return doesNotAccessMemory() || paramHasAttr(0, ParamAttr::ReadOnly);
2466 return doesNotAccessMemory() || paramHasAttr(0, Attribute::ReadOnly);
24672467 }
24682468 void setOnlyReadsMemory(bool OnlyReadsMemory = true) {
2469 if (OnlyReadsMemory) addParamAttr(0, ParamAttr::ReadOnly);
2470 else removeParamAttr(0, ParamAttr::ReadOnly | ParamAttr::ReadNone);
2469 if (OnlyReadsMemory) addAttribute(0, Attribute::ReadOnly);
2470 else removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
24712471 }
24722472
24732473 /// @brief Determine if the call cannot return.
24742474 bool doesNotReturn() const {
2475 return paramHasAttr(0, ParamAttr::NoReturn);
2475 return paramHasAttr(0, Attribute::NoReturn);
24762476 }
24772477 void setDoesNotReturn(bool DoesNotReturn = true) {
2478 if (DoesNotReturn) addParamAttr(0, ParamAttr::NoReturn);
2479 else removeParamAttr(0, ParamAttr::NoReturn);
2478 if (DoesNotReturn) addAttribute(0, Attribute::NoReturn);
2479 else removeAttribute(0, Attribute::NoReturn);
24802480 }
24812481
24822482 /// @brief Determine if the call cannot unwind.
24832483 bool doesNotThrow() const {
2484 return paramHasAttr(0, ParamAttr::NoUnwind);
2484 return paramHasAttr(0, Attribute::NoUnwind);
24852485 }
24862486 void setDoesNotThrow(bool DoesNotThrow = true) {
2487 if (DoesNotThrow) addParamAttr(0, ParamAttr::NoUnwind);
2488 else removeParamAttr(0, ParamAttr::NoUnwind);
2487 if (DoesNotThrow) addAttribute(0, Attribute::NoUnwind);
2488 else removeAttribute(0, Attribute::NoUnwind);
24892489 }
24902490
24912491 /// @brief Determine if the call returns a structure through first
24922492 /// pointer argument.
24932493 bool hasStructRetAttr() const {
24942494 // Be friendly and also check the callee.
2495 return paramHasAttr(1, ParamAttr::StructRet);
2495 return paramHasAttr(1, Attribute::StructRet);
24962496 }
24972497
24982498 /// getCalledFunction - Return the function called, or null if this is an
2323 class FunctionType;
2424 class Function;
2525 class Module;
26 class PAListPtr;
26 class AttrListPtr;
2727
2828 /// Intrinsic Namespace - This namespace contains an enum with a value for
2929 /// every intrinsic/builtin function known by LLVM. These enum values are
4848 ///
4949 const FunctionType *getType(ID id, const Type **Tys = 0, unsigned numTys = 0);
5050
51 /// Intrinsic::getParamAttrs(ID) - Return the attributes for an intrinsic.
51 /// Intrinsic::getAttributes(ID) - Return the attributes for an intrinsic.
5252 ///
53 PAListPtr getParamAttrs(ID id);
53 AttrListPtr getAttributes(ID id);
5454
5555 /// Intrinsic::getDeclaration(M, ID) - Create or insert an LLVM Function
5656 /// declaration for an intrinsic, and return it.
6161 unsigned getCallingConv() const;
6262 void setCallingConv(unsigned CC);
6363
64 /// getParamAttrs/setParamAttrs - get or set the parameter attributes of
64 /// getAttributes/setAttributes - get or set the parameter attributes of
6565 /// the call.
66 const PAListPtr &getParamAttrs() const;
67 void setParamAttrs(const PAListPtr &PAL);
66 const AttrListPtr &getAttributes() const;
67 void setAttributes(const AttrListPtr &PAL);
6868
6969 /// paramHasAttr - whether the call or the callee has the given attribute.
7070 bool paramHasAttr(uint16_t i, Attributes attr) const;
8282 typedef struct LLVMOpaquePassManager *LLVMPassManagerRef;
8383
8484 typedef enum {
85 LLVMZExtParamAttr = 1<<0,
86 LLVMSExtParamAttr = 1<<1,
87 LLVMNoReturnParamAttr = 1<<2,
88 LLVMInRegParamAttr = 1<<3,
89 LLVMStructRetParamAttr = 1<<4,
90 LLVMNoUnwindParamAttr = 1<<5,
91 LLVMNoAliasParamAttr = 1<<6,
92 LLVMByValParamAttr = 1<<7,
93 LLVMNestParamAttr = 1<<8,
94 LLVMReadNoneParamAttr = 1<<9,
95 LLVMReadOnlyParamAttr = 1<<10
96 } LLVMParamAttr;
85 LLVMZExtAttribute = 1<<0,
86 LLVMSExtAttribute = 1<<1,
87 LLVMNoReturnAttribute = 1<<2,
88 LLVMInRegAttribute = 1<<3,
89 LLVMStructRetAttribute = 1<<4,
90 LLVMNoUnwindAttribute = 1<<5,
91 LLVMNoAliasAttribute = 1<<6,
92 LLVMByValAttribute = 1<<7,
93 LLVMNestAttribute = 1<<8,
94 LLVMReadNoneAttribute = 1<<9,
95 LLVMReadOnlyAttribute = 1<<10
96 } LLVMAttribute;
9797
9898 typedef enum {
9999 LLVMVoidTypeKind, /**< type with no size */
422422 LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn);
423423 LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg);
424424 LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg);
425 void LLVMAddParamAttr(LLVMValueRef Arg, LLVMParamAttr PA);
426 void LLVMRemoveParamAttr(LLVMValueRef Arg, LLVMParamAttr PA);
425 void LLVMAddAttribute(LLVMValueRef Arg, LLVMAttribute PA);
426 void LLVMRemoveAttribute(LLVMValueRef Arg, LLVMAttribute PA);
427427 void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align);
428428
429429 /* Operations on basic blocks */
453453 /* Operations on call sites */
454454 void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC);
455455 unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr);
456 void LLVMAddInstrParamAttr(LLVMValueRef Instr, unsigned index, LLVMParamAttr);
457 void LLVMRemoveInstrParamAttr(LLVMValueRef Instr, unsigned index,
458 LLVMParamAttr);
456 void LLVMAddInstrAttribute(LLVMValueRef Instr, unsigned index, LLVMAttribute);
457 void LLVMRemoveInstrAttribute(LLVMValueRef Instr, unsigned index,
458 LLVMAttribute);
459459 void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index,
460460 unsigned align);
461461
399399
400400
401401 /* Copy the first part of user declarations. */
402 #line 14 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
402 #line 14 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
403403
404404 #include "ParserInternals.h"
405405 #include "llvm/CallingConv.h"
13761376
13771377 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
13781378 typedef union YYSTYPE
1379 #line 970 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
1379 #line 970 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
13801380 {
13811381 llvm::Module *ModuleVal;
13821382 llvm::Function *FunctionVal;
14041404
14051405 llvm::GlobalValue::LinkageTypes Linkage;
14061406 llvm::GlobalValue::VisibilityTypes Visibility;
1407 llvm::Attributes ParamAttrs;
1407 llvm::Attributes Attributes;
14081408 llvm::APInt *APIntVal;
14091409 int64_t SInt64Val;
14101410 uint64_t UInt64Val;
19601960 "OptLocalName", "OptAddrSpace", "OptLocalAssign", "LocalNumber",
19611961 "GlobalName", "OptGlobalAssign", "GlobalAssign", "GVInternalLinkage",
19621962 "GVExternalLinkage", "GVVisibilityStyle", "FunctionDeclareLinkage",
1963 "FunctionDefineLinkage", "AliasLinkage", "OptCallingConv", "ParamAttr",
1964 "OptParamAttrs", "FuncAttr", "OptFuncAttrs", "FuncNoteList", "FuncNote",
1963 "FunctionDefineLinkage", "AliasLinkage", "OptCallingConv", "Attribute",
1964 "OptAttributes", "FuncAttr", "OptFuncAttrs", "FuncNoteList", "FuncNote",
19651965 "OptFuncNotes", "OptGC", "OptAlign", "OptCAlign", "SectionString",
19661966 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "PrimType",
19671967 "Types", "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI",
36563656 switch (yyn)
36573657 {
36583658 case 29:
3659 #line 1147 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3659 #line 1147 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
36603660 { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;}
36613661 break;
36623662
36633663 case 30:
3664 #line 1147 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3664 #line 1147 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
36653665 { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;}
36663666 break;
36673667
36683668 case 31:
3669 #line 1148 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3669 #line 1148 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
36703670 { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;}
36713671 break;
36723672
36733673 case 32:
3674 #line 1148 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3674 #line 1148 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
36753675 { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;}
36763676 break;
36773677
36783678 case 33:
3679 #line 1149 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3679 #line 1149 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
36803680 { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;}
36813681 break;
36823682
36833683 case 34:
3684 #line 1149 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3684 #line 1149 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
36853685 { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;}
36863686 break;
36873687
36883688 case 35:
3689 #line 1150 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3689 #line 1150 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
36903690 { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;}
36913691 break;
36923692
36933693 case 36:
3694 #line 1150 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3694 #line 1150 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
36953695 { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;}
36963696 break;
36973697
36983698 case 37:
3699 #line 1151 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3699 #line 1151 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37003700 { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;}
37013701 break;
37023702
37033703 case 38:
3704 #line 1151 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3704 #line 1151 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37053705 { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;}
37063706 break;
37073707
37083708 case 39:
3709 #line 1155 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3709 #line 1155 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37103710 { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;}
37113711 break;
37123712
37133713 case 40:
3714 #line 1155 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3714 #line 1155 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37153715 { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;}
37163716 break;
37173717
37183718 case 41:
3719 #line 1156 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3719 #line 1156 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37203720 { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;}
37213721 break;
37223722
37233723 case 42:
3724 #line 1156 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3724 #line 1156 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37253725 { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;}
37263726 break;
37273727
37283728 case 43:
3729 #line 1157 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3729 #line 1157 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37303730 { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;}
37313731 break;
37323732
37333733 case 44:
3734 #line 1157 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3734 #line 1157 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37353735 { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;}
37363736 break;
37373737
37383738 case 45:
3739 #line 1158 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3739 #line 1158 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37403740 { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;}
37413741 break;
37423742
37433743 case 46:
3744 #line 1158 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3744 #line 1158 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37453745 { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;}
37463746 break;
37473747
37483748 case 47:
3749 #line 1159 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3749 #line 1159 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37503750 { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;}
37513751 break;
37523752
37533753 case 48:
3754 #line 1159 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3754 #line 1159 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37553755 { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;}
37563756 break;
37573757
37583758 case 49:
3759 #line 1160 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3759 #line 1160 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37603760 { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;}
37613761 break;
37623762
37633763 case 50:
3764 #line 1160 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3764 #line 1160 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37653765 { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;}
37663766 break;
37673767
37683768 case 51:
3769 #line 1161 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3769 #line 1161 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37703770 { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;}
37713771 break;
37723772
37733773 case 52:
3774 #line 1161 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3774 #line 1161 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37753775 { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;}
37763776 break;
37773777
37783778 case 53:
3779 #line 1162 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3779 #line 1162 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37803780 { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;}
37813781 break;
37823782
37833783 case 54:
3784 #line 1163 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3784 #line 1163 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37853785 { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;}
37863786 break;
37873787
37883788 case 65:
3789 #line 1172 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3789 #line 1172 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37903790 { (yyval.StrVal) = 0; ;}
37913791 break;
37923792
37933793 case 66:
3794 #line 1174 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3794 #line 1174 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
37953795 { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;}
37963796 break;
37973797
37983798 case 67:
3799 #line 1175 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3799 #line 1175 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38003800 { (yyval.UIntVal)=0; ;}
38013801 break;
38023802
38033803 case 68:
3804 #line 1179 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3804 #line 1179 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38053805 {
38063806 (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal);
38073807 CHECK_FOR_ERROR
38093809 break;
38103810
38113811 case 69:
3812 #line 1183 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3812 #line 1183 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38133813 {
38143814 (yyval.StrVal) = 0;
38153815 CHECK_FOR_ERROR
38173817 break;
38183818
38193819 case 70:
3820 #line 1188 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3820 #line 1188 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38213821 {
38223822 (yyval.UIntVal) = (yyvsp[(1) - (2)].UIntVal);
38233823 CHECK_FOR_ERROR
38253825 break;
38263826
38273827 case 74:
3828 #line 1197 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3828 #line 1197 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38293829 {
38303830 (yyval.StrVal) = 0;
38313831 CHECK_FOR_ERROR
38333833 break;
38343834
38353835 case 75:
3836 #line 1202 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3836 #line 1202 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38373837 {
38383838 (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal);
38393839 CHECK_FOR_ERROR
38413841 break;
38423842
38433843 case 76:
3844 #line 1208 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3844 #line 1208 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38453845 { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
38463846 break;
38473847
38483848 case 77:
3849 #line 1209 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3849 #line 1209 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38503850 { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
38513851 break;
38523852
38533853 case 78:
3854 #line 1210 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3854 #line 1210 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38553855 { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
38563856 break;
38573857
38583858 case 79:
3859 #line 1211 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3859 #line 1211 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38603860 { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
38613861 break;
38623862
38633863 case 80:
3864 #line 1212 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3864 #line 1212 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38653865 { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
38663866 break;
38673867
38683868 case 81:
3869 #line 1213 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3869 #line 1213 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38703870 { (yyval.Linkage) = GlobalValue::CommonLinkage; ;}
38713871 break;
38723872
38733873 case 82:
3874 #line 1217 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3874 #line 1217 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38753875 { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
38763876 break;
38773877
38783878 case 83:
3879 #line 1218 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3879 #line 1218 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38803880 { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
38813881 break;
38823882
38833883 case 84:
3884 #line 1219 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3884 #line 1219 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38853885 { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
38863886 break;
38873887
38883888 case 85:
3889 #line 1223 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3889 #line 1223 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38903890 { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;}
38913891 break;
38923892
38933893 case 86:
3894 #line 1224 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3894 #line 1224 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
38953895 { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;}
38963896 break;
38973897
38983898 case 87:
3899 #line 1225 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3899 #line 1225 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39003900 { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;}
39013901 break;
39023902
39033903 case 88:
3904 #line 1226 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3904 #line 1226 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39053905 { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;}
39063906 break;
39073907
39083908 case 89:
3909 #line 1230 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3909 #line 1230 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39103910 { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
39113911 break;
39123912
39133913 case 90:
3914 #line 1231 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3914 #line 1231 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39153915 { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
39163916 break;
39173917
39183918 case 91:
3919 #line 1232 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3919 #line 1232 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39203920 { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
39213921 break;
39223922
39233923 case 92:
3924 #line 1236 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3924 #line 1236 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39253925 { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
39263926 break;
39273927
39283928 case 93:
3929 #line 1237 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3929 #line 1237 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39303930 { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
39313931 break;
39323932
39333933 case 94:
3934 #line 1238 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3934 #line 1238 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39353935 { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
39363936 break;
39373937
39383938 case 95:
3939 #line 1239 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3939 #line 1239 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39403940 { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
39413941 break;
39423942
39433943 case 96:
3944 #line 1240 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3944 #line 1240 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39453945 { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
39463946 break;
39473947
39483948 case 97:
3949 #line 1244 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3949 #line 1244 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39503950 { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
39513951 break;
39523952
39533953 case 98:
3954 #line 1245 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3954 #line 1245 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39553955 { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
39563956 break;
39573957
39583958 case 99:
3959 #line 1246 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3959 #line 1246 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39603960 { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
39613961 break;
39623962
39633963 case 100:
3964 #line 1249 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3964 #line 1249 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39653965 { (yyval.UIntVal) = CallingConv::C; ;}
39663966 break;
39673967
39683968 case 101:
3969 #line 1250 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3969 #line 1250 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39703970 { (yyval.UIntVal) = CallingConv::C; ;}
39713971 break;
39723972
39733973 case 102:
3974 #line 1251 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3974 #line 1251 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39753975 { (yyval.UIntVal) = CallingConv::Fast; ;}
39763976 break;
39773977
39783978 case 103:
3979 #line 1252 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3979 #line 1252 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39803980 { (yyval.UIntVal) = CallingConv::Cold; ;}
39813981 break;
39823982
39833983 case 104:
3984 #line 1253 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3984 #line 1253 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39853985 { (yyval.UIntVal) = CallingConv::X86_StdCall; ;}
39863986 break;
39873987
39883988 case 105:
3989 #line 1254 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3989 #line 1254 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39903990 { (yyval.UIntVal) = CallingConv::X86_FastCall; ;}
39913991 break;
39923992
39933993 case 106:
3994 #line 1255 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3994 #line 1255 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
39953995 { (yyval.UIntVal) = CallingConv::X86_SSECall; ;}
39963996 break;
39973997
39983998 case 107:
3999 #line 1256 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
3999 #line 1256 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
40004000 {
40014001 if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val))
40024002 GEN_ERROR("Calling conv too large");
40064006 break;
40074007
40084008 case 108:
4009 #line 1263 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4010 { (yyval.ParamAttrs) = ParamAttr::ZExt; ;}
4009 #line 1263 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4010 { (yyval.Attributes) = Attribute::ZExt; ;}
40114011 break;
40124012
40134013 case 109:
4014 #line 1264 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4015 { (yyval.ParamAttrs) = ParamAttr::ZExt; ;}
4014 #line 1264 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4015 { (yyval.Attributes) = Attribute::ZExt; ;}
40164016 break;
40174017
40184018 case 110:
4019 #line 1265 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4020 { (yyval.ParamAttrs) = ParamAttr::SExt; ;}
4019 #line 1265 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4020 { (yyval.Attributes) = Attribute::SExt; ;}
40214021 break;
40224022
40234023 case 111:
4024 #line 1266 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4025 { (yyval.ParamAttrs) = ParamAttr::SExt; ;}
4024 #line 1266 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4025 { (yyval.Attributes) = Attribute::SExt; ;}
40264026 break;
40274027
40284028 case 112:
4029 #line 1267 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4030 { (yyval.ParamAttrs) = ParamAttr::InReg; ;}
4029 #line 1267 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4030 { (yyval.Attributes) = Attribute::InReg; ;}
40314031 break;
40324032
40334033 case 113:
4034 #line 1268 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4035 { (yyval.ParamAttrs) = ParamAttr::StructRet; ;}
4034 #line 1268 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4035 { (yyval.Attributes) = Attribute::StructRet; ;}
40364036 break;
40374037
40384038 case 114:
4039 #line 1269 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4040 { (yyval.ParamAttrs) = ParamAttr::NoAlias; ;}
4039 #line 1269 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4040 { (yyval.Attributes) = Attribute::NoAlias; ;}
40414041 break;
40424042
40434043 case 115:
4044 #line 1270 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4045 { (yyval.ParamAttrs) = ParamAttr::ByVal; ;}
4044 #line 1270 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4045 { (yyval.Attributes) = Attribute::ByVal; ;}
40464046 break;
40474047
40484048 case 116:
4049 #line 1271 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4050 { (yyval.ParamAttrs) = ParamAttr::Nest; ;}
4049 #line 1271 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4050 { (yyval.Attributes) = Attribute::Nest; ;}
40514051 break;
40524052
40534053 case 117:
4054 #line 1272 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4055 { (yyval.ParamAttrs) =
4056 ParamAttr::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;}
4054 #line 1272 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4055 { (yyval.Attributes) =
4056 Attribute::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;}
40574057 break;
40584058
40594059 case 118:
4060 #line 1276 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4061 { (yyval.ParamAttrs) = ParamAttr::None; ;}
4060 #line 1276 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4061 { (yyval.Attributes) = Attribute::None; ;}
40624062 break;
40634063
40644064 case 119:
4065 #line 1277 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4066 {
4067 (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs);
4065 #line 1277 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4066 {
4067 (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes);
40684068 ;}
40694069 break;
40704070
40714071 case 120:
4072 #line 1282 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4073 { (yyval.ParamAttrs) = ParamAttr::NoReturn; ;}
4072 #line 1282 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4073 { (yyval.Attributes) = Attribute::NoReturn; ;}
40744074 break;
40754075
40764076 case 121:
4077 #line 1283 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4078 { (yyval.ParamAttrs) = ParamAttr::NoUnwind; ;}
4077 #line 1283 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4078 { (yyval.Attributes) = Attribute::NoUnwind; ;}
40794079 break;
40804080
40814081 case 122:
4082 #line 1284 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4083 { (yyval.ParamAttrs) = ParamAttr::InReg; ;}
4082 #line 1284 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4083 { (yyval.Attributes) = Attribute::InReg; ;}
40844084 break;
40854085
40864086 case 123:
4087 #line 1285 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4088 { (yyval.ParamAttrs) = ParamAttr::ZExt; ;}
4087 #line 1285 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4088 { (yyval.Attributes) = Attribute::ZExt; ;}
40894089 break;
40904090
40914091 case 124:
4092 #line 1286 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4093 { (yyval.ParamAttrs) = ParamAttr::SExt; ;}
4092 #line 1286 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4093 { (yyval.Attributes) = Attribute::SExt; ;}
40944094 break;
40954095
40964096 case 125:
4097 #line 1287 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4098 { (yyval.ParamAttrs) = ParamAttr::ReadNone; ;}
4097 #line 1287 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4098 { (yyval.Attributes) = Attribute::ReadNone; ;}
40994099 break;
41004100
41014101 case 126:
4102 #line 1288 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4103 { (yyval.ParamAttrs) = ParamAttr::ReadOnly; ;}
4102 #line 1288 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4103 { (yyval.Attributes) = Attribute::ReadOnly; ;}
41044104 break;
41054105
41064106 case 127:
4107 #line 1291 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4108 { (yyval.ParamAttrs) = ParamAttr::None; ;}
4107 #line 1291 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4108 { (yyval.Attributes) = Attribute::None; ;}
41094109 break;
41104110
41114111 case 128:
4112 #line 1292 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4113 {
4114 (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs);
4112 #line 1292 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4113 {
4114 (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes);
41154115 ;}
41164116 break;
41174117
41184118 case 129:
4119 #line 1297 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4120 { (yyval.ParamAttrs) = (yyvsp[(1) - (1)].ParamAttrs); ;}
4119 #line 1297 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4120 { (yyval.Attributes) = (yyvsp[(1) - (1)].Attributes); ;}
41214121 break;
41224122
41234123 case 130:
4124 #line 1298 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4125 {
4126 unsigned tmp = (yyvsp[(1) - (3)].ParamAttrs) | (yyvsp[(3) - (3)].ParamAttrs);
4127 if ((yyvsp[(3) - (3)].ParamAttrs) == FnAttr::NoInline
4128 && ((yyvsp[(1) - (3)].ParamAttrs) & FnAttr::AlwaysInline))
4124 #line 1298 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4125 {
4126 unsigned tmp = (yyvsp[(1) - (3)].Attributes) | (yyvsp[(3) - (3)].Attributes);
4127 if ((yyvsp[(3) - (3)].Attributes) == Attribute::NoInline
4128 && ((yyvsp[(1) - (3)].Attributes) & Attribute::AlwaysInline))
41294129 GEN_ERROR("Function Notes may include only one inline notes!")
4130 if ((yyvsp[(3) - (3)].ParamAttrs) == FnAttr::AlwaysInline
4131 && ((yyvsp[(1) - (3)].ParamAttrs) & FnAttr::NoInline))
4130 if ((yyvsp[(3) - (3)].Attributes) == Attribute::AlwaysInline
4131 && ((yyvsp[(1) - (3)].Attributes) & Attribute::NoInline))
41324132 GEN_ERROR("Function Notes may include only one inline notes!")
4133 (yyval.ParamAttrs) = tmp;
4133 (yyval.Attributes) = tmp;
41344134 CHECK_FOR_ERROR
41354135 ;}
41364136 break;
41374137
41384138 case 131:
4139 #line 1311 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4140 { (yyval.ParamAttrs) = FnAttr::NoInline; ;}
4139 #line 1311 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4140 { (yyval.Attributes) = Attribute::NoInline; ;}
41414141 break;
41424142
41434143 case 132:
4144 #line 1312 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4145 { (yyval.ParamAttrs) = FnAttr::AlwaysInline; ;}
4144 #line 1312 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4145 { (yyval.Attributes) = Attribute::AlwaysInline; ;}
41464146 break;
41474147
41484148 case 133:
4149 #line 1313 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4150 { (yyval.ParamAttrs) = FnAttr::OptimizeForSize; ;}
4149 #line 1313 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4150 { (yyval.Attributes) = Attribute::OptimizeForSize; ;}
41514151 break;
41524152
41534153 case 134:
4154 #line 1316 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4155 { (yyval.ParamAttrs) = FnAttr::None; ;}
4154 #line 1316 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4155 { (yyval.Attributes) = Attribute::None; ;}
41564156 break;
41574157
41584158 case 135:
4159 #line 1317 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4160 {
4161 (yyval.ParamAttrs) = (yyvsp[(3) - (4)].ParamAttrs);
4159 #line 1317 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
4160 {
4161 (yyval.Attributes) = (yyvsp[(3) - (4)].Attributes);
41624162 ;}
41634163 break;
41644164
41654165 case 136:
4166 #line 1322 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4166 #line 1322 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
41674167 { (yyval.StrVal) = 0; ;}
41684168 break;
41694169
41704170 case 137:
4171 #line 1323 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4171 #line 1323 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
41724172 {
41734173 (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal);
41744174 ;}
41754175 break;
41764176
41774177 case 138:
4178 #line 1330 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4178 #line 1330 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
41794179 { (yyval.UIntVal) = 0; ;}
41804180 break;
41814181
41824182 case 139:
4183 #line 1331 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4183 #line 1331 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
41844184 {
41854185 (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val);
41864186 if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
41904190 break;
41914191
41924192 case 140:
4193 #line 1337 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4193 #line 1337 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
41944194 { (yyval.UIntVal) = 0; ;}
41954195 break;
41964196
41974197 case 141:
4198 #line 1338 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4198 #line 1338 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
41994199 {
42004200 (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val);
42014201 if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
42054205 break;
42064206
42074207 case 142:
4208 #line 1347 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4208 #line 1347 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42094209 {
42104210 for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i)
42114211 if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\')
42164216 break;
42174217
42184218 case 143:
4219 #line 1355 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4219 #line 1355 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42204220 { (yyval.StrVal) = 0; ;}
42214221 break;
42224222
42234223 case 144:
4224 #line 1356 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4224 #line 1356 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42254225 { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;}
42264226 break;
42274227
42284228 case 145:
4229 #line 1361 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4229 #line 1361 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42304230 {;}
42314231 break;
42324232
42334233 case 146:
4234 #line 1362 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4234 #line 1362 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42354235 {;}
42364236 break;
42374237
42384238 case 147:
4239 #line 1363 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4239 #line 1363 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42404240 {
42414241 CurGV->setSection(*(yyvsp[(1) - (1)].StrVal));
42424242 delete (yyvsp[(1) - (1)].StrVal);
42454245 break;
42464246
42474247 case 148:
4248 #line 1368 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4248 #line 1368 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42494249 {
42504250 if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val)))
42514251 GEN_ERROR("Alignment must be a power of two");
42554255 break;
42564256
42574257 case 156:
4258 #line 1384 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4258 #line 1384 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42594259 {
42604260 (yyval.TypeVal) = new PATypeHolder(OpaqueType::get());
42614261 CHECK_FOR_ERROR
42634263 break;
42644264
42654265 case 157:
4266 #line 1388 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4266 #line 1388 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42674267 {
42684268 (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType));
42694269 CHECK_FOR_ERROR
42714271 break;
42724272
42734273 case 158:
4274 #line 1392 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4274 #line 1392 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42754275 { // Pointer type?
42764276 if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy)
42774277 GEN_ERROR("Cannot form a pointer to a basic block");
42824282 break;
42834283
42844284 case 159:
4285 #line 1399 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4285 #line 1399 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42864286 { // Named types are also simple types...
42874287 const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal));
42884288 CHECK_FOR_ERROR
42914291 break;
42924292
42934293 case 160:
4294 #line 1404 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4294 #line 1404 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
42954295 { // Type UpReference
42964296 if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range");
42974297 OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
43034303 break;
43044304
43054305 case 161:
4306 #line 1412 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4306 #line 1412 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
43074307 {
43084308 // Allow but ignore attributes on function types; this permits auto-upgrade.
43094309 // FIXME: remove in LLVM 3.0.
43364336 break;
43374337
43384338 case 162:
4339 #line 1441 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4339 #line 1441 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
43404340 {
43414341 // Allow but ignore attributes on function types; this permits auto-upgrade.
43424342 // FIXME: remove in LLVM 3.0.
43644364 break;
43654365
43664366 case 163:
4367 #line 1466 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4367 #line 1466 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
43684368 { // Sized array type?
43694369 (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (yyvsp[(2) - (5)].UInt64Val))));
43704370 delete (yyvsp[(4) - (5)].TypeVal);
43734373 break;
43744374
43754375 case 164:
4376 #line 1471 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4376 #line 1471 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
43774377 { // Vector type?
43784378 const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get();
43794379 if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val))
43874387 break;
43884388
43894389 case 165:
4390 #line 1481 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4390 #line 1481 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
43914391 { // Structure type?
43924392 std::vector Elements;
43934393 for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(),
44014401 break;
44024402
44034403 case 166:
4404 #line 1491 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4404 #line 1491 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44054405 { // Empty structure type?
44064406 (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector()));
44074407 CHECK_FOR_ERROR
44094409 break;
44104410
44114411 case 167:
4412 #line 1495 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4412 #line 1495 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44134413 {
44144414 std::vector Elements;
44154415 for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(),
44234423 break;
44244424
44254425 case 168:
4426 #line 1505 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4426 #line 1505 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44274427 { // Empty structure type?
44284428 (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true));
44294429 CHECK_FOR_ERROR
44314431 break;
44324432
44334433 case 169:
4434 #line 1512 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4434 #line 1512 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44354435 {
44364436 // Allow but ignore attributes on function types; this permits auto-upgrade.
44374437 // FIXME: remove in LLVM 3.0.
44384438 (yyval.TypeWithAttrs).Ty = (yyvsp[(1) - (2)].TypeVal);
4439 (yyval.TypeWithAttrs).Attrs = ParamAttr::None;
4439 (yyval.TypeWithAttrs).Attrs = Attribute::None;
44404440 ;}
44414441 break;
44424442
44434443 case 170:
4444 #line 1521 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4444 #line 1521 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44454445 {
44464446 if (!UpRefs.empty())
44474447 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription());
44524452 break;
44534453
44544454 case 171:
4455 #line 1528 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4455 #line 1528 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44564456 {
44574457 (yyval.TypeVal) = new PATypeHolder(Type::VoidTy);
44584458 ;}
44594459 break;
44604460
44614461 case 172:
4462 #line 1533 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4462 #line 1533 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44634463 {
44644464 (yyval.TypeWithAttrsList) = new TypeWithAttrsList();
44654465 (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs));
44684468 break;
44694469
44704470 case 173:
4471 #line 1538 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4471 #line 1538 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44724472 {
44734473 ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs));
44744474 CHECK_FOR_ERROR
44764476 break;
44774477
44784478 case 175:
4479 #line 1546 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4479 #line 1546 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44804480 {
44814481 (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList);
4482 TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
4482 TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
44834483 TWA.Ty = new PATypeHolder(Type::VoidTy);
44844484 (yyval.TypeWithAttrsList)->push_back(TWA);
44854485 CHECK_FOR_ERROR
44874487 break;
44884488
44894489 case 176:
4490 #line 1553 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4490 #line 1553 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
44914491 {
44924492 (yyval.TypeWithAttrsList) = new TypeWithAttrsList;
4493 TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
4493 TypeWithAttrs TWA; TWA.Attrs = Attribute::None;
44944494 TWA.Ty = new PATypeHolder(Type::VoidTy);
44954495 (yyval.TypeWithAttrsList)->push_back(TWA);
44964496 CHECK_FOR_ERROR
44984498 break;
44994499
45004500 case 177:
4501 #line 1560 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4501 #line 1560 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
45024502 {
45034503 (yyval.TypeWithAttrsList) = new TypeWithAttrsList();
45044504 CHECK_FOR_ERROR
45064506 break;
45074507
45084508 case 178:
4509 #line 1568 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4509 #line 1568 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
45104510 {
45114511 (yyval.TypeList) = new std::list();
45124512 (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal));
45164516 break;
45174517
45184518 case 179:
4519 #line 1574 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4519 #line 1574 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
45204520 {
45214521 ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal));
45224522 delete (yyvsp[(3) - (3)].TypeVal);
45254525 break;
45264526
45274527 case 180:
4528 #line 1586 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4528 #line 1586 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
45294529 { // Nonempty unsized arr
45304530 if (!UpRefs.empty())
45314531 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription());
45574557 break;
45584558
45594559 case 181:
4560 #line 1614 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4560 #line 1614 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
45614561 {
45624562 if (!UpRefs.empty())
45634563 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
45774577 break;
45784578
45794579 case 182:
4580 #line 1630 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4580 #line 1630 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
45814581 {
45824582 if (!UpRefs.empty())
45834583 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
46084608 break;
46094609
46104610 case 183:
4611 #line 1657 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4611 #line 1657 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
46124612 { // Nonempty unsized arr
46134613 if (!UpRefs.empty())
46144614 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription());
46404640 break;
46414641
46424642 case 184:
4643 #line 1685 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4643 #line 1685 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
46444644 {
46454645 const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get());
46464646 if (STy == 0)
46704670 break;
46714671
46724672 case 185:
4673 #line 1711 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4673 #line 1711 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
46744674 {
46754675 if (!UpRefs.empty())
46764676 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
46944694 break;
46954695
46964696 case 186:
4697 #line 1731 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4697 #line 1731 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
46984698 {
46994699 const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get());
47004700 if (STy == 0)
47244724 break;
47254725
47264726 case 187:
4727 #line 1757 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4727 #line 1757 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
47284728 {
47294729 if (!UpRefs.empty())
47304730 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription());
47484748 break;
47494749
47504750 case 188:
4751 #line 1777 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4751 #line 1777 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
47524752 {
47534753 if (!UpRefs.empty())
47544754 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
47644764 break;
47654765
47664766 case 189:
4767 #line 1789 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4767 #line 1789 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
47684768 {
47694769 if (!UpRefs.empty())
47704770 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
47754775 break;
47764776
47774777 case 190:
4778 #line 1796 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4778 #line 1796 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
47794779 {
47804780 if (!UpRefs.empty())
47814781 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
48454845 break;
48464846
48474847 case 191:
4848 #line 1862 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4848 #line 1862 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
48494849 {
48504850 if (!UpRefs.empty())
48514851 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
48594859 break;
48604860
48614861 case 192:
4862 #line 1872 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4862 #line 1872 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
48634863 {
48644864 if (!UpRefs.empty())
48654865 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
48734873 break;
48744874
48754875 case 193:
4876 #line 1882 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4876 #line 1882 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
48774877 { // integral constants
48784878 if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val)))
48794879 GEN_ERROR("Constant value doesn't fit in type");
48834883 break;
48844884
48854885 case 194:
4886 #line 1888 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4886 #line 1888 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
48874887 { // arbitrary precision integer constants
48884888 uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth();
48894889 if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) {
48974897 break;
48984898
48994899 case 195:
4900 #line 1898 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4900 #line 1898 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
49014901 { // integral constants
49024902 if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val)))
49034903 GEN_ERROR("Constant value doesn't fit in type");
49074907 break;
49084908
49094909 case 196:
4910 #line 1904 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4910 #line 1904 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
49114911 { // arbitrary precision integer constants
49124912 uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth();
49134913 if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) {
49214921 break;
49224922
49234923 case 197:
4924 #line 1914 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4924 #line 1914 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
49254925 { // Boolean constants
49264926 if (cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1)
49274927 GEN_ERROR("Constant true must have type i1");
49314931 break;
49324932
49334933 case 198:
4934 #line 1920 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4934 #line 1920 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
49354935 { // Boolean constants
49364936 if (cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1)
49374937 GEN_ERROR("Constant false must have type i1");
49414941 break;
49424942
49434943 case 199:
4944 #line 1926 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4944 #line 1926 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
49454945 { // Floating point constants
49464946 if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), *(yyvsp[(2) - (2)].FPVal)))
49474947 GEN_ERROR("Floating point constant invalid for type");
49564956 break;
49574957
49584958 case 200:
4959 #line 1939 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4959 #line 1939 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
49604960 {
49614961 if (!UpRefs.empty())
49624962 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription());
49724972 break;
49734973
49744974 case 201:
4975 #line 1951 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
4975 #line 1951 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
49764976 {
49774977 if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()))
49784978 GEN_ERROR("GetElementPtr requires a pointer operand");
49974997 break;
49984998
49994999 case 202:
5000 #line 1972 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5000 #line 1972 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50015001 {
50025002 if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty)
50035003 GEN_ERROR("Select condition must be of boolean type");
50095009 break;
50105010
50115011 case 203:
5012 #line 1980 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5012 #line 1980 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50135013 {
50145014 if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType())
50155015 GEN_ERROR("Binary operator types must match");
50195019 break;
50205020
50215021 case 204:
5022 #line 1986 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5022 #line 1986 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50235023 {
50245024 if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType())
50255025 GEN_ERROR("Logical operator types must match");
50345034 break;
50355035
50365036 case 205:
5037 #line 1997 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5037 #line 1997 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50385038 {
50395039 if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
50405040 GEN_ERROR("icmp operand types must match");
50435043 break;
50445044
50455045 case 206:
5046 #line 2002 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5046 #line 2002 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50475047 {
50485048 if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
50495049 GEN_ERROR("fcmp operand types must match");
50525052 break;
50535053
50545054 case 207:
5055 #line 2007 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5055 #line 2007 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50565056 {
50575057 if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
50585058 GEN_ERROR("vicmp operand types must match");
50615061 break;
50625062
50635063 case 208:
5064 #line 2012 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5064 #line 2012 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50655065 {
50665066 if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType())
50675067 GEN_ERROR("vfcmp operand types must match");
50705070 break;
50715071
50725072 case 209:
5073 #line 2017 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5073 #line 2017 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50745074 {
50755075 if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal)))
50765076 GEN_ERROR("Invalid extractelement operands");
50805080 break;
50815081
50825082 case 210:
5083 #line 2023 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5083 #line 2023 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50845084 {
50855085 if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)))
50865086 GEN_ERROR("Invalid insertelement operands");
50905090 break;
50915091
50925092 case 211:
5093 #line 2029 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5093 #line 2029 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
50945094 {
50955095 if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal)))
50965096 GEN_ERROR("Invalid shufflevector operands");
51005100 break;
51015101
51025102 case 212:
5103 #line 2035 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5103 #line 2035 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51045104 {
51055105 if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa((yyvsp[(3) - (5)].ConstVal)->getType()))
51065106 GEN_ERROR("ExtractValue requires an aggregate operand");
51125112 break;
51135113
51145114 case 213:
5115 #line 2043 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5115 #line 2043 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51165116 {
51175117 if (!isa((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa((yyvsp[(3) - (7)].ConstVal)->getType()))
51185118 GEN_ERROR("InsertValue requires an aggregate operand");
51245124 break;
51255125
51265126 case 214:
5127 #line 2054 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5127 #line 2054 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51285128 {
51295129 ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal));
51305130 CHECK_FOR_ERROR
51325132 break;
51335133
51345134 case 215:
5135 #line 2058 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5135 #line 2058 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51365136 {
51375137 (yyval.ConstVector) = new std::vector();
51385138 (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal));
51415141 break;
51425142
51435143 case 216:
5144 #line 2066 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5144 #line 2066 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51455145 { (yyval.BoolVal) = false; ;}
51465146 break;
51475147
51485148 case 217:
5149 #line 2066 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5149 #line 2066 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51505150 { (yyval.BoolVal) = true; ;}
51515151 break;
51525152
51535153 case 218:
5154 #line 2069 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5154 #line 2069 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51555155 { (yyval.BoolVal) = true; ;}
51565156 break;
51575157
51585158 case 219:
5159 #line 2069 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5159 #line 2069 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51605160 { (yyval.BoolVal) = false; ;}
51615161 break;
51625162
51635163 case 220:
5164 #line 2072 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5164 #line 2072 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51655165 {
51665166 const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get();
51675167 Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal));
51775177 break;
51785178
51795179 case 221:
5180 #line 2084 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5180 #line 2084 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51815181 {
51825182 Constant *Val = (yyvsp[(3) - (6)].ConstVal);
51835183 const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get();
51935193 break;
51945194
51955195 case 222:
5196 #line 2105 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5196 #line 2105 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
51975197 {
51985198 (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
51995199 CurModule.ModuleDone();
52025202 break;
52035203
52045204 case 223:
5205 #line 2110 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5205 #line 2110 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52065206 {
52075207 (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
52085208 CurModule.ModuleDone();
52115211 break;
52125212
52135213 case 226:
5214 #line 2123 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5214 #line 2123 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52155215 { CurFun.isDeclare = false; ;}
52165216 break;
52175217
52185218 case 227:
5219 #line 2123 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5219 #line 2123 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52205220 {
52215221 CurFun.FunctionDone();
52225222 CHECK_FOR_ERROR
52245224 break;
52255225
52265226 case 228:
5227 #line 2127 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5227 #line 2127 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52285228 { CurFun.isDeclare = true; ;}
52295229 break;
52305230
52315231 case 229:
5232 #line 2127 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5232 #line 2127 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52335233 {
52345234 CHECK_FOR_ERROR
52355235 ;}
52365236 break;
52375237
52385238 case 230:
5239 #line 2130 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5239 #line 2130 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52405240 {
52415241 CHECK_FOR_ERROR
52425242 ;}
52435243 break;
52445244
52455245 case 231:
5246 #line 2133 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5246 #line 2133 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52475247 {
52485248 if (!UpRefs.empty())
52495249 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription());
52715271 break;
52725272
52735273 case 232:
5274 #line 2157 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5274 #line 2157 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52755275 {
52765276 ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType));
52775277
52865286 break;
52875287
52885288 case 233:
5289 #line 2169 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5289 #line 2169 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
52905290 {
52915291 /* "Externally Visible" Linkage */
52925292 if ((yyvsp[(5) - (6)].ConstVal) == 0)
52985298 break;
52995299
53005300 case 234:
5301 #line 2176 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5301 #line 2176 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
53025302 {
53035303 CurGV = 0;
53045304 ;}
53055305 break;
53065306
53075307 case 235:
5308 #line 2180 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5308 #line 2180 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
53095309 {
53105310 if ((yyvsp[(6) - (7)].ConstVal) == 0)
53115311 GEN_ERROR("Global value initializer is not a constant");
53155315 break;
53165316
53175317 case 236:
5318 #line 2185 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5318 #line 2185 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
53195319 {
53205320 CurGV = 0;
53215321 ;}
53225322 break;
53235323
53245324 case 237:
5325 #line 2189 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5325 #line 2189 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
53265326 {
53275327 if (!UpRefs.empty())
53285328 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription());
53335333 break;
53345334
53355335 case 238:
5336 #line 2195 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5336 #line 2195 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
53375337 {
53385338 CurGV = 0;
53395339 CHECK_FOR_ERROR
53415341 break;
53425342
53435343 case 239:
5344 #line 2199 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5344 #line 2199 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
53455345 {
53465346 std::string Name;
53475347 if ((yyvsp[(1) - (5)].StrVal)) {
53855385 break;
53865386
53875387 case 240:
5388 #line 2239 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5388 #line 2239 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
53895389 {
53905390 CHECK_FOR_ERROR
53915391 ;}
53925392 break;
53935393
53945394 case 241:
5395 #line 2242 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5395 #line 2242 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
53965396 {
53975397 CHECK_FOR_ERROR
53985398 ;}
53995399 break;
54005400
54015401 case 242:
5402 #line 2248 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5402 #line 2248 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54035403 {
54045404 const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
54055405 if (AsmSoFar.empty())
54125412 break;
54135413
54145414 case 243:
5415 #line 2258 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5415 #line 2258 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54165416 {
54175417 CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal));
54185418 delete (yyvsp[(3) - (3)].StrVal);
54205420 break;
54215421
54225422 case 244:
5423 #line 2262 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5423 #line 2262 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54245424 {
54255425 CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal));
54265426 delete (yyvsp[(3) - (3)].StrVal);
54285428 break;
54295429
54305430 case 246:
5431 #line 2269 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5431 #line 2269 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54325432 {
54335433 CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal));
54345434 delete (yyvsp[(3) - (3)].StrVal);
54375437 break;
54385438
54395439 case 247:
5440 #line 2274 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5440 #line 2274 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54415441 {
54425442 CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal));
54435443 delete (yyvsp[(1) - (1)].StrVal);
54465446 break;
54475447
54485448 case 248:
5449 #line 2279 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5449 #line 2279 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54505450 {
54515451 CHECK_FOR_ERROR
54525452 ;}
54535453 break;
54545454
54555455 case 249:
5456 #line 2288 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5456 #line 2288 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54575457 {
54585458 if (!UpRefs.empty())
54595459 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription());
54605460 if (!(*(yyvsp[(3) - (5)].TypeVal))->isFirstClassType())
54615461 GEN_ERROR("Argument types must be first-class");
5462 ArgListEntry E; E.Attrs = (yyvsp[(4) - (5)].ParamAttrs); E.Ty = (yyvsp[(3) - (5)].TypeVal); E.Name = (yyvsp[(5) - (5)].StrVal);
5462 ArgListEntry E; E.Attrs = (yyvsp[(4) - (5)].Attributes); E.Ty = (yyvsp[(3) - (5)].TypeVal); E.Name = (yyvsp[(5) - (5)].StrVal);
54635463 (yyval.ArgList) = (yyvsp[(1) - (5)].ArgList);
54645464 (yyvsp[(1) - (5)].ArgList)->push_back(E);
54655465 CHECK_FOR_ERROR
54675467 break;
54685468
54695469 case 250:
5470 #line 2298 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5470 #line 2298 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54715471 {
54725472 if (!UpRefs.empty())
54735473 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription());
54745474 if (!(*(yyvsp[(1) - (3)].TypeVal))->isFirstClassType())
54755475 GEN_ERROR("Argument types must be first-class");
5476 ArgListEntry E; E.Attrs = (yyvsp[(2) - (3)].ParamAttrs); E.Ty = (yyvsp[(1) - (3)].TypeVal); E.Name = (yyvsp[(3) - (3)].StrVal);
5476 ArgListEntry E; E.Attrs = (yyvsp[(2) - (3)].Attributes); E.Ty = (yyvsp[(1) - (3)].TypeVal); E.Name = (yyvsp[(3) - (3)].StrVal);
54775477 (yyval.ArgList) = new ArgListType;
54785478 (yyval.ArgList)->push_back(E);
54795479 CHECK_FOR_ERROR
54815481 break;
54825482
54835483 case 251:
5484 #line 2309 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5484 #line 2309 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54855485 {
54865486 (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList);
54875487 CHECK_FOR_ERROR
54895489 break;
54905490
54915491 case 252:
5492 #line 2313 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5492 #line 2313 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
54935493 {
54945494 (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList);
54955495 struct ArgListEntry E;
54965496 E.Ty = new PATypeHolder(Type::VoidTy);
54975497 E.Name = 0;
5498 E.Attrs = ParamAttr::None;
5498 E.Attrs = Attribute::None;
54995499 (yyval.ArgList)->push_back(E);
55005500 CHECK_FOR_ERROR
55015501 ;}
55025502 break;
55035503
55045504 case 253:
5505 #line 2322 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5505 #line 2322 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
55065506 {
55075507 (yyval.ArgList) = new ArgListType;
55085508 struct ArgListEntry E;
55095509 E.Ty = new PATypeHolder(Type::VoidTy);
55105510 E.Name = 0;
5511 E.Attrs = ParamAttr::None;
5511 E.Attrs = Attribute::None;
55125512 (yyval.ArgList)->push_back(E);
55135513 CHECK_FOR_ERROR
55145514 ;}
55155515 break;
55165516
55175517 case 254:
5518 #line 2331 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5518 #line 2331 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
55195519 {
55205520 (yyval.ArgList) = 0;
55215521 CHECK_FOR_ERROR
55235523 break;
55245524
55255525 case 255:
5526 #line 2337 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5526 #line 2337 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
55275527 {
55285528 std::string FunctionName(*(yyvsp[(3) - (11)].StrVal));
55295529 delete (yyvsp[(3) - (11)].StrVal); // Free strdup'd memory!
55375537 GEN_ERROR("Invalid result type for LLVM function");
55385538
55395539 std::vector ParamTypeList;
5540 SmallVector Attrs;
5541 if ((yyvsp[(7) - (11)].ParamAttrs) != ParamAttr::None)
5542 Attrs.push_back(FnAttributeWithIndex::get(0, (yyvsp[(7) - (11)].ParamAttrs)));
5540 SmallVector Attrs;
5541 if ((yyvsp[(7) - (11)].Attributes) != Attribute::None)
5542 Attrs.push_back(AttributeWithIndex::get(0, (yyvsp[(7) - (11)].Attributes)));
55435543 if ((yyvsp[(5) - (11)].ArgList)) { // If there are arguments...
55445544 unsigned index = 1;
55455545 for (ArgListType::iterator I = (yyvsp[(5) - (11)].ArgList)->begin(); I != (yyvsp[(5) - (11)].ArgList)->end(); ++I, ++index) {
55475547 if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
55485548 GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
55495549 ParamTypeList.push_back(Ty);
5550 if (Ty != Type::VoidTy && I->Attrs != ParamAttr::None)
5551 Attrs.push_back(FnAttributeWithIndex::get(index, I->Attrs));
5550 if (Ty != Type::VoidTy && I->Attrs != Attribute::None)
5551 Attrs.push_back(AttributeWithIndex::get(index, I->Attrs));
55525552 }
55535553 }
55545554
55555555 bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy;
55565556 if (isVarArg) ParamTypeList.pop_back();
55575557
5558 PAListPtr PAL;
5558 AttrListPtr PAL;
55595559 if (!Attrs.empty())
5560 PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
5560 PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
55615561
55625562 FunctionType *FT = FunctionType::get(*(yyvsp[(2) - (11)].TypeVal), ParamTypeList, isVarArg);
55635563 const PointerType *PFT = PointerType::getUnqual(FT);
55765576 // Move the function to the end of the list, from whereever it was
55775577 // previously inserted.
55785578 Fn = cast(FWRef);
5579 assert(Fn->getParamAttrs().isEmpty() &&
5579 assert(Fn->getAttributes().isEmpty() &&
55805580 "Forward reference has parameter attributes!");
55815581 CurModule.CurrentModule->getFunctionList().remove(Fn);
55825582 CurModule.CurrentModule->getFunctionList().push_back(Fn);
55865586 // The existing function doesn't have the same type. This is an overload
55875587 // error.
55885588 GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
5589 } else if (Fn->getParamAttrs() != PAL) {
5589 } else if (Fn->getAttributes() != PAL) {
55905590 // The existing function doesn't have the same parameter attributes.
55915591 // This is an overload error.
55925592 GEN_ERROR("Overload of function '" + FunctionName + "' not permitted.");
56165616 Fn->setVisibility(CurFun.Visibility);
56175617 }
56185618 Fn->setCallingConv((yyvsp[(1) - (11)].UIntVal));
5619 Fn->setParamAttrs(PAL);
5619 Fn->setAttributes(PAL);
56205620 Fn->setAlignment((yyvsp[(9) - (11)].UIntVal));
56215621 if ((yyvsp[(8) - (11)].StrVal)) {
56225622 Fn->setSection(*(yyvsp[(8) - (11)].StrVal));
56265626 Fn->setGC((yyvsp[(10) - (11)].StrVal)->c_str());
56275627 delete (yyvsp[(10) - (11)].StrVal);
56285628 }
5629 if ((yyvsp[(11) - (11)].ParamAttrs)) {
5630 Fn->setNotes((yyvsp[(11) - (11)].ParamAttrs));
5629 if ((yyvsp[(11) - (11)].Attributes)) {
5630 Fn->setNotes((yyvsp[(11) - (11)].Attributes));
56315631 }
56325632
56335633 // Add all of the arguments we parsed to the function...
56575657 break;
56585658
56595659 case 258:
5660 #line 2470 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5660 #line 2470 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
56615661 {
56625662 (yyval.FunctionVal) = CurFun.CurrentFunction;
56635663
56695669 break;
56705670
56715671 case 261:
5672 #line 2481 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5672 #line 2481 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
56735673 {
56745674 (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
56755675 CHECK_FOR_ERROR
56775677 break;
56785678
56795679 case 262:
5680 #line 2486 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5680 #line 2486 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
56815681 {
56825682 CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage));
56835683 CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility));
56885688 break;
56895689
56905690 case 263:
5691 #line 2498 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5691 #line 2498 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
56925692 {
56935693 (yyval.BoolVal) = false;
56945694 CHECK_FOR_ERROR
56965696 break;
56975697
56985698 case 264:
5699 #line 2502 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5699 #line 2502 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57005700 {
57015701 (yyval.BoolVal) = true;
57025702 CHECK_FOR_ERROR
57045704 break;
57055705
57065706 case 265:
5707 #line 2507 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5707 #line 2507 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57085708 { // A reference to a direct constant
57095709 (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val));
57105710 CHECK_FOR_ERROR
57125712 break;
57135713
57145714 case 266:
5715 #line 2511 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5715 #line 2511 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57165716 {
57175717 (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val));
57185718 CHECK_FOR_ERROR
57205720 break;
57215721
57225722 case 267:
5723 #line 2515 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5723 #line 2515 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57245724 { // arbitrary precision integer constants
57255725 (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), true);
57265726 delete (yyvsp[(1) - (1)].APIntVal);
57295729 break;
57305730
57315731 case 268:
5732 #line 2520 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5732 #line 2520 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57335733 { // arbitrary precision integer constants
57345734 (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), false);
57355735 delete (yyvsp[(1) - (1)].APIntVal);
57385738 break;
57395739
57405740 case 269:
5741 #line 2525 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5741 #line 2525 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57425742 { // Perhaps it's an FP constant?
57435743 (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal));
57445744 CHECK_FOR_ERROR
57465746 break;
57475747
57485748 case 270:
5749 #line 2529 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5749 #line 2529 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57505750 {
57515751 (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue());
57525752 CHECK_FOR_ERROR
57545754 break;
57555755
57565756 case 271:
5757 #line 2533 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5757 #line 2533 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57585758 {
57595759 (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse());
57605760 CHECK_FOR_ERROR
57625762 break;
57635763
57645764 case 272:
5765 #line 2537 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5765 #line 2537 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57665766 {
57675767 (yyval.ValIDVal) = ValID::createNull();
57685768 CHECK_FOR_ERROR
57705770 break;
57715771
57725772 case 273:
5773 #line 2541 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5773 #line 2541 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57745774 {
57755775 (yyval.ValIDVal) = ValID::createUndef();
57765776 CHECK_FOR_ERROR
57785778 break;
57795779
57805780 case 274:
5781 #line 2545 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5781 #line 2545 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57825782 { // A vector zero constant.
57835783 (yyval.ValIDVal) = ValID::createZeroInit();
57845784 CHECK_FOR_ERROR
57865786 break;
57875787
57885788 case 275:
5789 #line 2549 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5789 #line 2549 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
57905790 { // Nonempty unsized packed vector
57915791 const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType();
57925792 unsigned NumElements = (yyvsp[(2) - (3)].ConstVector)->size();
58125812 break;
58135813
58145814 case 276:
5815 #line 2571 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5815 #line 2571 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
58165816 { // Nonempty unsized arr
58175817 const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType();
58185818 uint64_t NumElements = (yyvsp[(2) - (3)].ConstVector)->size();
58385838 break;
58395839
58405840 case 277:
5841 #line 2593 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5841 #line 2593 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
58425842 {
58435843 // Use undef instead of an array because it's inconvenient to determine
58445844 // the element type at this point, there being no elements to examine.
58485848 break;
58495849
58505850 case 278:
5851 #line 2599 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5851 #line 2599 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
58525852 {
58535853 uint64_t NumElements = (yyvsp[(2) - (2)].StrVal)->length();
58545854 const Type *ETy = Type::Int8Ty;
58655865 break;
58665866
58675867 case 279:
5868 #line 2612 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5868 #line 2612 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
58695869 {
58705870 std::vector Elements((yyvsp[(2) - (3)].ConstVector)->size());
58715871 for (unsigned i = 0, e = (yyvsp[(2) - (3)].ConstVector)->size(); i != e; ++i)
58815881 break;
58825882
58835883 case 280:
5884 #line 2624 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5884 #line 2624 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
58855885 {
58865886 const StructType *STy = StructType::get(std::vector());
58875887 (yyval.ValIDVal) = ValID::create(ConstantStruct::get(STy, std::vector()));
58905890 break;
58915891
58925892 case 281:
5893 #line 2629 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5893 #line 2629 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
58945894 {
58955895 std::vector Elements((yyvsp[(3) - (5)].ConstVector)->size());
58965896 for (unsigned i = 0, e = (yyvsp[(3) - (5)].ConstVector)->size(); i != e; ++i)
59065906 break;
59075907
59085908 case 282:
5909 #line 2641 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5909 #line 2641 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59105910 {
59115911 const StructType *STy = StructType::get(std::vector(),
59125912 /*isPacked=*/true);
59165916 break;
59175917
59185918 case 283:
5919 #line 2647 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5919 #line 2647 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59205920 {
59215921 (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal));
59225922 CHECK_FOR_ERROR
59245924 break;
59255925
59265926 case 284:
5927 #line 2651 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5927 #line 2651 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59285928 {
59295929 (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal));
59305930 delete (yyvsp[(3) - (5)].StrVal);
59345934 break;
59355935
59365936 case 285:
5937 #line 2661 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5937 #line 2661 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59385938 { // Is it an integer reference...?
59395939 (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal));
59405940 CHECK_FOR_ERROR
59425942 break;
59435943
59445944 case 286:
5945 #line 2665 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5945 #line 2665 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59465946 {
59475947 (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal));
59485948 CHECK_FOR_ERROR
59505950 break;
59515951
59525952 case 287:
5953 #line 2669 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5953 #line 2669 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59545954 { // Is it a named reference...?
59555955 (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal));
59565956 delete (yyvsp[(1) - (1)].StrVal);
59595959 break;
59605960
59615961 case 288:
5962 #line 2674 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5962 #line 2674 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59635963 { // Is it a named reference...?
59645964 (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal));
59655965 delete (yyvsp[(1) - (1)].StrVal);
59685968 break;
59695969
59705970 case 291:
5971 #line 2687 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5971 #line 2687 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59725972 {
59735973 if (!UpRefs.empty())
59745974 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription());
59795979 break;
59805980
59815981 case 292:
5982 #line 2696 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5982 #line 2696 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59835983 {
59845984 (yyval.ValueList) = new std::vector();
59855985 (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal));
59885988 break;
59895989
59905990 case 293:
5991 #line 2701 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5991 #line 2701 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
59925992 {
59935993 ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal));
59945994 CHECK_FOR_ERROR
59965996 break;
59975997
59985998 case 294:
5999 #line 2706 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
5999 #line 2706 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60006000 {
60016001 (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
60026002 CHECK_FOR_ERROR
60046004 break;
60056005
60066006 case 295:
6007 #line 2710 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6007 #line 2710 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60086008 { // Do not allow functions with 0 basic blocks
60096009 (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
60106010 CHECK_FOR_ERROR
60126012 break;
60136013
60146014 case 296:
6015 #line 2719 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6015 #line 2719 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60166016 {
60176017 setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal));
60186018 CHECK_FOR_ERROR
60246024 break;
60256025
60266026 case 297:
6027 #line 2728 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6027 #line 2728 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60286028 {
60296029 CHECK_FOR_ERROR
60306030 int ValNum = InsertValue((yyvsp[(3) - (3)].TermInstVal));
60396039 break;
60406040
60416041 case 298:
6042 #line 2741 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6042 #line 2741 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60436043 {
60446044 if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal)))
60456045 if (CastInst *CI2 = dyn_cast(CI1->getOperand(0)))
60526052 break;
60536053
60546054 case 299:
6055 #line 2750 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6055 #line 2750 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60566056 { // Empty space between instruction lists
60576057 (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum));
60586058 CHECK_FOR_ERROR
60606060 break;
60616061
60626062 case 300:
6063 #line 2754 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6063 #line 2754 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60646064 { // Labelled (named) basic block
60656065 (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)));
60666066 delete (yyvsp[(1) - (1)].StrVal);
60706070 break;
60716071
60726072 case 301:
6073 #line 2762 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6073 #line 2762 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60746074 { // Return with a result...
60756075 ValueList &VL = *(yyvsp[(2) - (2)].ValueList);
60766076 assert(!VL.empty() && "Invalid ret operands!");
60946094 break;
60956095
60966096 case 302:
6097 #line 2782 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6097 #line 2782 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
60986098 { // Return with no result...
60996099 (yyval.TermInstVal) = ReturnInst::Create();
61006100 CHECK_FOR_ERROR
61026102 break;
61036103
61046104 case 303:
6105 #line 2786 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6105 #line 2786 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
61066106 { // Unconditional Branch...
61076107 BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal));
61086108 CHECK_FOR_ERROR
61116111 break;
61126112
61136113 case 304:
6114 #line 2791 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6114 #line 2791 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
61156115 {
61166116 if (cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() != 1)
61176117 GEN_ERROR("Branch condition must have type i1");
61266126 break;
61276127
61286128 case 305:
6129 #line 2802 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6129 #line 2802 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
61306130 {
61316131 Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal));
61326132 CHECK_FOR_ERROR
61496149 break;
61506150
61516151 case 306:
6152 #line 2821 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6152 #line 2821 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
61536153 {
61546154 Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal));
61556155 CHECK_FOR_ERROR
61626162 break;
61636163
61646164 case 307:
6165 #line 2831 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6165 #line 2831 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
61666166 {
61676167
61686168 // Handle the short syntax
61966196 BasicBlock *Except = getBBVal((yyvsp[(14) - (14)].ValIDVal));
61976197 CHECK_FOR_ERROR
61986198
6199 SmallVector Attrs;
6200 if ((yyvsp[(8) - (14)].ParamAttrs) != ParamAttr::None)
6201 Attrs.push_back(FnAttributeWithIndex::get(0, (yyvsp[(8) - (14)].ParamAttrs)));
6199 SmallVector Attrs;
6200 if ((yyvsp[(8) - (14)].Attributes) != Attribute::None)
6201 Attrs.push_back(AttributeWithIndex::get(0, (yyvsp[(8) - (14)].Attributes)));
62026202
62036203 // Check the arguments
62046204 ValueList Args;
62206220 GEN_ERROR("Parameter " + ArgI->Val->getName()+ " is not of type '" +
62216221 (*I)->getDescription() + "'");
62226222 Args.push_back(ArgI->Val);
6223 if (ArgI->Attrs != ParamAttr::None)
6224 Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
6223 if (ArgI->Attrs != Attribute::None)
6224 Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
62256225 }
62266226
62276227 if (Ty->isVarArg()) {
62286228 if (I == E)
62296229 for (; ArgI != ArgE; ++ArgI, ++index) {
62306230 Args.push_back(ArgI->Val); // push the remaining varargs
6231 if (ArgI->Attrs != ParamAttr::None)
6232 Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
6231 if (ArgI->Attrs != Attribute::None)
6232 Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
62336233 }
62346234 } else if (I != E || ArgI != ArgE)
62356235 GEN_ERROR("Invalid number of parameters detected");
62366236 }
62376237
6238 PAListPtr PAL;
6238 AttrListPtr PAL;
62396239 if (!Attrs.empty())
6240 PAL = PAListPtr::get(Attrs.begin(), Attrs.end());
6240 PAL = AttrListPtr::get(Attrs.begin(), Attrs.end());
62416241
62426242 // Create the InvokeInst
62436243 InvokeInst *II = InvokeInst::Create(V, Normal, Except,
62446244 Args.begin(), Args.end());
62456245 II->setCallingConv((yyvsp[(2) - (14)].UIntVal));
6246 II->setParamAttrs(PAL);
6246 II->setAttributes(PAL);
62476247 (yyval.TermInstVal) = II;
62486248 delete (yyvsp[(6) - (14)].ParamList);
62496249 CHECK_FOR_ERROR
62516251 break;
62526252
62536253 case 308:
6254 #line 2916 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6254 #line 2916 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
62556255 {
62566256 (yyval.TermInstVal) = new UnwindInst();
62576257 CHECK_FOR_ERROR
62596259 break;
62606260
62616261 case 309:
6262 #line 2920 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6262 #line 2920 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
62636263 {
62646264 (yyval.TermInstVal) = new UnreachableInst();
62656265 CHECK_FOR_ERROR
62676267 break;
62686268
62696269 case 310:
6270 #line 2927 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6270 #line 2927 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
62716271 {
62726272 (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable);
62736273 Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal)));
62826282 break;
62836283
62846284 case 311:
6285 #line 2938 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6285 #line 2938 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
62866286 {
62876287 (yyval.JumpTable) = new std::vector >();
62886288 Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal)));
62986298 break;
62996299
63006300 case 312:
6301 #line 2951 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6301 #line 2951 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
63026302 {
63036303 // Is this definition named?? if so, assign the name...
63046304 setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal));
63106310 break;
63116311
63126312 case 313:
6313 #line 2960 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6313 #line 2960 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
63146314 {
63156315 CHECK_FOR_ERROR
63166316 int ValNum = InsertValue((yyvsp[(2) - (2)].InstVal));
63256325 break;
63266326
63276327 case 314:
6328 #line 2973 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6328 #line 2973 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
63296329 { // Used for PHI nodes
63306330 if (!UpRefs.empty())
63316331 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription());
63406340 break;
63416341
63426342 case 315:
6343 #line 2984 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6343 #line 2984 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
63446344 {
63456345 (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList);
63466346 Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal));
63526352 break;
63536353
63546354 case 316:
6355 #line 2994 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6356 {
6357 // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
6355 #line 2994 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
6356 {
6357 // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
63586358 if (!UpRefs.empty())
63596359 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription());
63606360 // Used for call and invoke instructions
63616361 (yyval.ParamList) = new ParamList();
6362 ParamListEntry E; E.Attrs = (yyvsp[(2) - (4)].ParamAttrs) | (yyvsp[(4) - (4)].ParamAttrs); E.Val = getVal((yyvsp[(1) - (4)].TypeVal)->get(), (yyvsp[(3) - (4)].ValIDVal));
6362 ParamListEntry E; E.Attrs = (yyvsp[(2) - (4)].Attributes) | (yyvsp[(4) - (4)].Attributes); E.Val = getVal((yyvsp[(1) - (4)].TypeVal)->get(), (yyvsp[(3) - (4)].ValIDVal));
63636363 (yyval.ParamList)->push_back(E);
63646364 delete (yyvsp[(1) - (4)].TypeVal);
63656365 CHECK_FOR_ERROR
63676367 break;
63686368
63696369 case 317:
6370 #line 3005 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6371 {
6372 // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
6370 #line 3005 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
6371 {
6372 // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
63736373 // Labels are only valid in ASMs
63746374 (yyval.ParamList) = new ParamList();
6375 ParamListEntry E; E.Attrs = (yyvsp[(2) - (4)].ParamAttrs) | (yyvsp[(4) - (4)].ParamAttrs); E.Val = getBBVal((yyvsp[(3) - (4)].ValIDVal));
6375 ParamListEntry E; E.Attrs = (yyvsp[(2) - (4)].Attributes) | (yyvsp[(4) - (4)].Attributes); E.Val = getBBVal((yyvsp[(3) - (4)].ValIDVal));
63766376 (yyval.ParamList)->push_back(E);
63776377 CHECK_FOR_ERROR
63786378 ;}
63796379 break;
63806380
63816381 case 318:
6382 #line 3013 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6383 {
6384 // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
6382 #line 3013 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
6383 {
6384 // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
63856385 if (!UpRefs.empty())
63866386 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
63876387 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList);
6388 ParamListEntry E; E.Attrs = (yyvsp[(4) - (6)].ParamAttrs) | (yyvsp[(6) - (6)].ParamAttrs); E.Val = getVal((yyvsp[(3) - (6)].TypeVal)->get(), (yyvsp[(5) - (6)].ValIDVal));
6388 ParamListEntry E; E.Attrs = (yyvsp[(4) - (6)].Attributes) | (yyvsp[(6) - (6)].Attributes); E.Val = getVal((yyvsp[(3) - (6)].TypeVal)->get(), (yyvsp[(5) - (6)].ValIDVal));
63896389 (yyval.ParamList)->push_back(E);
63906390 delete (yyvsp[(3) - (6)].TypeVal);
63916391 CHECK_FOR_ERROR
63936393 break;
63946394
63956395 case 319:
6396 #line 3023 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6397 {
6398 // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0
6396 #line 3023 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
6397 {
6398 // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0
63996399 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList);
6400 ParamListEntry E; E.Attrs = (yyvsp[(4) - (6)].ParamAttrs) | (yyvsp[(6) - (6)].ParamAttrs); E.Val = getBBVal((yyvsp[(5) - (6)].ValIDVal));
6400 ParamListEntry E; E.Attrs = (yyvsp[(4) - (6)].Attributes) | (yyvsp[(6) - (6)].Attributes); E.Val = getBBVal((yyvsp[(5) - (6)].ValIDVal));
64016401 (yyval.ParamList)->push_back(E);
64026402 CHECK_FOR_ERROR
64036403 ;}
64046404 break;
64056405
64066406 case 320:
6407 #line 3030 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6407 #line 3030 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64086408 { (yyval.ParamList) = new ParamList(); ;}
64096409 break;
64106410
64116411 case 321:
6412 #line 3033 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6412 #line 3033 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64136413 { (yyval.ValueList) = new std::vector(); ;}
64146414 break;
64156415
64166416 case 322:
6417 #line 3034 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6417 #line 3034 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64186418 {
64196419 (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList);
64206420 (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal));
64236423 break;
64246424
64256425 case 323:
6426 #line 3042 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6426 #line 3042 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64276427 {
64286428 (yyval.ConstantList) = new std::vector();
64296429 if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val))
64336433 break;
64346434
64356435 case 324:
6436 #line 3048 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6436 #line 3048 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64376437 {
64386438 (yyval.ConstantList) = (yyvsp[(1) - (3)].ConstantList);
64396439 if ((unsigned)(yyvsp[(3) - (3)].UInt64Val) != (yyvsp[(3) - (3)].UInt64Val))
64446444 break;
64456445
64466446 case 325:
6447 #line 3057 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6447 #line 3057 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64486448 {
64496449 (yyval.BoolVal) = true;
64506450 CHECK_FOR_ERROR
64526452 break;
64536453
64546454 case 326:
6455 #line 3061 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6455 #line 3061 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64566456 {
64576457 (yyval.BoolVal) = false;
64586458 CHECK_FOR_ERROR
64606460 break;
64616461
64626462 case 327:
6463 #line 3066 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6463 #line 3066 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64646464 {
64656465 if (!UpRefs.empty())
64666466 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription());
64806480 break;
64816481
64826482 case 328:
6483 #line 3082 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6483 #line 3082 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
64846484 {
64856485 if (!UpRefs.empty())
64866486 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription());
65016501 break;
65026502
65036503 case 329:
6504 #line 3099 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6504 #line 3099 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
65056505 {
65066506 if (!UpRefs.empty())
65076507 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
65176517 break;
65186518
65196519 case 330:
6520 #line 3111 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6520 #line 3111 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
65216521 {
65226522 if (!UpRefs.empty())
65236523 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
65336533 break;
65346534
65356535 case 331:
6536 #line 3123 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6536 #line 3123 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
65376537 {
65386538 if (!UpRefs.empty())
65396539 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
65516551 break;
65526552
65536553 case 332:
6554 #line 3137 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6554 #line 3137 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
65556555 {
65566556 if (!UpRefs.empty())
65576557 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription());
65696569 break;
65706570
65716571 case 333:
6572 #line 3151 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6572 #line 3151 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
65736573 {
65746574 if (!UpRefs.empty())
65756575 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription());
65856585 break;
65866586
65876587 case 334:
6588 #line 3163 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6588 #line 3163 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
65896589 {
65906590 if (isa((yyvsp[(2) - (6)].ValueVal)->getType())) {
65916591 // vector select
66106610 break;
66116611
66126612 case 335:
6613 #line 3184 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6613 #line 3184 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
66146614 {
66156615 if (!UpRefs.empty())
66166616 GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription());
66216621 break;
66226622
66236623 case 336:
6624 #line 3191 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6624 #line 3191 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
66256625 {
66266626 if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal)))
66276627 GEN_ERROR("Invalid extractelement operands");
66316631 break;
66326632
66336633 case 337:
6634 #line 3197 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6634 #line 3197 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
66356635 {
66366636 if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)))
66376637 GEN_ERROR("Invalid insertelement operands");
66416641 break;
66426642
66436643 case 338:
6644 #line 3203 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6644 #line 3203 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
66456645 {
66466646 if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal)))
66476647 GEN_ERROR("Invalid shufflevector operands");
66516651 break;
66526652
66536653 case 339:
6654 #line 3209 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6654 #line 3209 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
66556655 {
66566656 const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType();
66576657 if (!Ty->isFirstClassType())
66706670 break;
66716671
66726672 case 340:
6673 #line 3225 "/Users/echristo/sources/llvm/lib/AsmParser/llvmAsmParser.y"
6673 #line 3225 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
66746674 {
66756675
66766676 // Handle the short syntax
67076707 theF->getName() + "'");
67086708 }
67096709
6710 // Set up the ParamAttrs for the function
6711 SmallVector Attrs;
6712 if ((yyvsp[(8) - (8)].ParamAttrs) != ParamAttr::None)
6713 Attrs.push_back(FnAttributeWithIndex::get(0, (yyvsp[(8) - (8)].ParamAttrs)));
6710 // Set up the Attributes for the function
6711 SmallVector Attrs;
6712 if ((yyvsp[(8) - (8)].Attributes) != Attribute::None)
6713 Attrs.push_back(AttributeWithIndex::get(0, (yyvsp[(8) - (8)].Attributes)));
67146714 // Check the arguments
67156715 ValueList Args;
67166716 if ((yyvsp[(6) - (8)].ParamList)->empty()) { // Has no arguments?
67316731 GEN_ERROR("Parameter " + ArgI->Val->getName()+ " is not of type '" +
67326732 (*I)->getDescription() + "'");
67336733 Args.push_back(ArgI->Val);
6734 if (ArgI->Attrs != ParamAttr::None)
6735 Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
6734 if (ArgI->Attrs != Attribute::None)
6735 Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
67366736 }
67376737 if (Ty->isVarArg()) {
67386738 if (I == E)
67396739 for (; ArgI != ArgE; ++ArgI, ++index) {
67406740 Args.push_back(ArgI->Val); // push the remaining varargs
6741 if (ArgI->Attrs != ParamAttr::None)
6742 Attrs.push_back(FnAttributeWithIndex::get(index, ArgI->Attrs));
6741 if (ArgI->Attrs != Attribute::None)
6742 Attrs.push_back(AttributeWithIndex::get(index, ArgI->Attrs));
67436743 }
6744</