Skip to content

Commit

Permalink
Rename to something more sensible. No functionality change.
Browse files Browse the repository at this point in the history
llvm-svn: 174909
  • Loading branch information
isanbard committed Feb 11, 2013
1 parent 3d38609 commit 89ade92
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions llvm/include/llvm/IR/Function.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Function : public GlobalValue,
BasicBlockListType BasicBlocks; ///< The basic blocks
mutable ArgumentListType ArgumentList; ///< The formal arguments
ValueSymbolTable *SymTab; ///< Symbol table of args/instructions
AttributeSet AttributeList; ///< Parameter attributes
AttributeSet AttributeSets; ///< Parameter attributes

// HasLazyArguments is stored in Value::SubclassData.
/*bool HasLazyArguments;*/
Expand Down Expand Up @@ -162,16 +162,16 @@ class Function : public GlobalValue,

/// getAttributes - Return the attribute list for this Function.
///
const AttributeSet &getAttributes() const { return AttributeList; }
AttributeSet getAttributes() const { return AttributeSets; }

/// setAttributes - Set the attribute list for this Function.
///
void setAttributes(const AttributeSet &attrs) { AttributeList = attrs; }
void setAttributes(AttributeSet attrs) { AttributeSets = attrs; }

/// addFnAttr - Add function attributes to this function.
///
void addFnAttr(Attribute::AttrKind N) {
setAttributes(AttributeList.addAttribute(getContext(),
setAttributes(AttributeSets.addAttribute(getContext(),
AttributeSet::FunctionIndex, N));
}

Expand All @@ -193,12 +193,12 @@ class Function : public GlobalValue,

/// @brief Extract the alignment for a call or parameter (0=unknown).
unsigned getParamAlignment(unsigned i) const {
return AttributeList.getParamAlignment(i);
return AttributeSets.getParamAlignment(i);
}

/// @brief Determine if the function does not access memory.
bool doesNotAccessMemory() const {
return AttributeList.hasAttribute(AttributeSet::FunctionIndex,
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
Attribute::ReadNone);
}
void setDoesNotAccessMemory() {
Expand All @@ -208,7 +208,7 @@ class Function : public GlobalValue,
/// @brief Determine if the function does not access or only reads memory.
bool onlyReadsMemory() const {
return doesNotAccessMemory() ||
AttributeList.hasAttribute(AttributeSet::FunctionIndex,
AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
Attribute::ReadOnly);
}
void setOnlyReadsMemory() {
Expand All @@ -217,7 +217,7 @@ class Function : public GlobalValue,

/// @brief Determine if the function cannot return.
bool doesNotReturn() const {
return AttributeList.hasAttribute(AttributeSet::FunctionIndex,
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
Attribute::NoReturn);
}
void setDoesNotReturn() {
Expand All @@ -226,7 +226,7 @@ class Function : public GlobalValue,

/// @brief Determine if the function cannot unwind.
bool doesNotThrow() const {
return AttributeList.hasAttribute(AttributeSet::FunctionIndex,
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
Attribute::NoUnwind);
}
void setDoesNotThrow() {
Expand All @@ -235,7 +235,7 @@ class Function : public GlobalValue,

/// @brief Determine if the call cannot be duplicated.
bool cannotDuplicate() const {
return AttributeList.hasAttribute(AttributeSet::FunctionIndex,
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
Attribute::NoDuplicate);
}
void setCannotDuplicate() {
Expand All @@ -245,7 +245,7 @@ class Function : public GlobalValue,
/// @brief True if the ABI mandates (or the user requested) that this
/// function be in a unwind table.
bool hasUWTable() const {
return AttributeList.hasAttribute(AttributeSet::FunctionIndex,
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
Attribute::UWTable);
}
void setHasUWTable() {
Expand All @@ -260,13 +260,13 @@ class Function : public GlobalValue,
/// @brief Determine if the function returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
return AttributeList.hasAttribute(1, Attribute::StructRet);
return AttributeSets.hasAttribute(1, Attribute::StructRet);
}

/// @brief Determine if the parameter does not alias other parameters.
/// @param n The parameter to check. 1 is the first parameter, 0 is the return
bool doesNotAlias(unsigned n) const {
return AttributeList.hasAttribute(n, Attribute::NoAlias);
return AttributeSets.hasAttribute(n, Attribute::NoAlias);
}
void setDoesNotAlias(unsigned n) {
addAttribute(n, Attribute::NoAlias);
Expand All @@ -275,7 +275,7 @@ class Function : public GlobalValue,
/// @brief Determine if the parameter can be captured.
/// @param n The parameter to check. 1 is the first parameter, 0 is the return
bool doesNotCapture(unsigned n) const {
return AttributeList.hasAttribute(n, Attribute::NoCapture);
return AttributeSets.hasAttribute(n, Attribute::NoCapture);
}
void setDoesNotCapture(unsigned n) {
addAttribute(n, Attribute::NoCapture);
Expand Down

0 comments on commit 89ade92

Please sign in to comment.