mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Remove Function::getParamAttributes and use the AttributeSet accessor methods instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -189,17 +189,11 @@ public:
|
||||
void setGC(const char *Str);
|
||||
void clearGC();
|
||||
|
||||
|
||||
/// getRetAttributes - Return the return attributes for querying.
|
||||
Attribute getRetAttributes() const {
|
||||
return AttributeList.getRetAttributes();
|
||||
}
|
||||
|
||||
/// getParamAttributes - Return the parameter attributes for querying.
|
||||
Attribute getParamAttributes(unsigned Idx) const {
|
||||
return AttributeList.getParamAttributes(Idx);
|
||||
}
|
||||
|
||||
/// addAttribute - adds the attribute to the list of attributes.
|
||||
void addAttribute(unsigned i, Attribute attr);
|
||||
|
||||
@@ -275,13 +269,15 @@ public:
|
||||
/// @brief Determine if the function returns a structure through first
|
||||
/// pointer argument.
|
||||
bool hasStructRetAttr() const {
|
||||
return getParamAttributes(1).hasAttribute(Attribute::StructRet);
|
||||
return AttributeList.getParamAttributes(1).
|
||||
hasAttribute(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 getParamAttributes(n).hasAttribute(Attribute::NoAlias);
|
||||
return AttributeList.getParamAttributes(n).
|
||||
hasAttribute(Attribute::NoAlias);
|
||||
}
|
||||
void setDoesNotAlias(unsigned n) {
|
||||
addAttribute(n, Attribute::get(getContext(), Attribute::NoAlias));
|
||||
@@ -290,7 +286,8 @@ public:
|
||||
/// @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 getParamAttributes(n).hasAttribute(Attribute::NoCapture);
|
||||
return AttributeList.getParamAttributes(n).
|
||||
hasAttribute(Attribute::NoCapture);
|
||||
}
|
||||
void setDoesNotCapture(unsigned n) {
|
||||
addAttribute(n, Attribute::get(getContext(), Attribute::NoCapture));
|
||||
|
||||
Reference in New Issue
Block a user