@@ -85,7 +85,7 @@ class Function : public GlobalValue,
85
85
BasicBlockListType BasicBlocks; // /< The basic blocks
86
86
mutable ArgumentListType ArgumentList; // /< The formal arguments
87
87
ValueSymbolTable *SymTab; // /< Symbol table of args/instructions
88
- AttributeSet AttributeList; // /< Parameter attributes
88
+ AttributeSet AttributeSets; // /< Parameter attributes
89
89
90
90
// HasLazyArguments is stored in Value::SubclassData.
91
91
/* bool HasLazyArguments;*/
@@ -162,16 +162,16 @@ class Function : public GlobalValue,
162
162
163
163
// / getAttributes - Return the attribute list for this Function.
164
164
// /
165
- const AttributeSet & getAttributes () const { return AttributeList ; }
165
+ AttributeSet getAttributes () const { return AttributeSets ; }
166
166
167
167
// / setAttributes - Set the attribute list for this Function.
168
168
// /
169
- void setAttributes (const AttributeSet & attrs) { AttributeList = attrs; }
169
+ void setAttributes (AttributeSet attrs) { AttributeSets = attrs; }
170
170
171
171
// / addFnAttr - Add function attributes to this function.
172
172
// /
173
173
void addFnAttr (Attribute::AttrKind N) {
174
- setAttributes (AttributeList .addAttribute (getContext (),
174
+ setAttributes (AttributeSets .addAttribute (getContext (),
175
175
AttributeSet::FunctionIndex, N));
176
176
}
177
177
@@ -193,12 +193,12 @@ class Function : public GlobalValue,
193
193
194
194
// / @brief Extract the alignment for a call or parameter (0=unknown).
195
195
unsigned getParamAlignment (unsigned i) const {
196
- return AttributeList .getParamAlignment (i);
196
+ return AttributeSets .getParamAlignment (i);
197
197
}
198
198
199
199
// / @brief Determine if the function does not access memory.
200
200
bool doesNotAccessMemory () const {
201
- return AttributeList .hasAttribute (AttributeSet::FunctionIndex,
201
+ return AttributeSets .hasAttribute (AttributeSet::FunctionIndex,
202
202
Attribute::ReadNone);
203
203
}
204
204
void setDoesNotAccessMemory () {
@@ -208,7 +208,7 @@ class Function : public GlobalValue,
208
208
// / @brief Determine if the function does not access or only reads memory.
209
209
bool onlyReadsMemory () const {
210
210
return doesNotAccessMemory () ||
211
- AttributeList .hasAttribute (AttributeSet::FunctionIndex,
211
+ AttributeSets .hasAttribute (AttributeSet::FunctionIndex,
212
212
Attribute::ReadOnly);
213
213
}
214
214
void setOnlyReadsMemory () {
@@ -217,7 +217,7 @@ class Function : public GlobalValue,
217
217
218
218
// / @brief Determine if the function cannot return.
219
219
bool doesNotReturn () const {
220
- return AttributeList .hasAttribute (AttributeSet::FunctionIndex,
220
+ return AttributeSets .hasAttribute (AttributeSet::FunctionIndex,
221
221
Attribute::NoReturn);
222
222
}
223
223
void setDoesNotReturn () {
@@ -226,7 +226,7 @@ class Function : public GlobalValue,
226
226
227
227
// / @brief Determine if the function cannot unwind.
228
228
bool doesNotThrow () const {
229
- return AttributeList .hasAttribute (AttributeSet::FunctionIndex,
229
+ return AttributeSets .hasAttribute (AttributeSet::FunctionIndex,
230
230
Attribute::NoUnwind);
231
231
}
232
232
void setDoesNotThrow () {
@@ -235,7 +235,7 @@ class Function : public GlobalValue,
235
235
236
236
// / @brief Determine if the call cannot be duplicated.
237
237
bool cannotDuplicate () const {
238
- return AttributeList .hasAttribute (AttributeSet::FunctionIndex,
238
+ return AttributeSets .hasAttribute (AttributeSet::FunctionIndex,
239
239
Attribute::NoDuplicate);
240
240
}
241
241
void setCannotDuplicate () {
@@ -245,7 +245,7 @@ class Function : public GlobalValue,
245
245
// / @brief True if the ABI mandates (or the user requested) that this
246
246
// / function be in a unwind table.
247
247
bool hasUWTable () const {
248
- return AttributeList .hasAttribute (AttributeSet::FunctionIndex,
248
+ return AttributeSets .hasAttribute (AttributeSet::FunctionIndex,
249
249
Attribute::UWTable);
250
250
}
251
251
void setHasUWTable () {
@@ -260,13 +260,13 @@ class Function : public GlobalValue,
260
260
// / @brief Determine if the function returns a structure through first
261
261
// / pointer argument.
262
262
bool hasStructRetAttr () const {
263
- return AttributeList .hasAttribute (1 , Attribute::StructRet);
263
+ return AttributeSets .hasAttribute (1 , Attribute::StructRet);
264
264
}
265
265
266
266
// / @brief Determine if the parameter does not alias other parameters.
267
267
// / @param n The parameter to check. 1 is the first parameter, 0 is the return
268
268
bool doesNotAlias (unsigned n) const {
269
- return AttributeList .hasAttribute (n, Attribute::NoAlias);
269
+ return AttributeSets .hasAttribute (n, Attribute::NoAlias);
270
270
}
271
271
void setDoesNotAlias (unsigned n) {
272
272
addAttribute (n, Attribute::NoAlias);
@@ -275,7 +275,7 @@ class Function : public GlobalValue,
275
275
// / @brief Determine if the parameter can be captured.
276
276
// / @param n The parameter to check. 1 is the first parameter, 0 is the return
277
277
bool doesNotCapture (unsigned n) const {
278
- return AttributeList .hasAttribute (n, Attribute::NoCapture);
278
+ return AttributeSets .hasAttribute (n, Attribute::NoCapture);
279
279
}
280
280
void setDoesNotCapture (unsigned n) {
281
281
addAttribute (n, Attribute::NoCapture);
0 commit comments