summaryrefslogtreecommitdiff
path: root/lib/VMCore/Attributes.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-09-20 14:44:42 +0000
committerBill Wendling <isanbard@gmail.com>2012-09-20 14:44:42 +0000
commit8ce1e432d1c942d101617b3c623970a4f763f93d (patch)
treefcdf2ec41ce4f7e27ab421aaa942fb479e2b2d2e /lib/VMCore/Attributes.cpp
parent6dfabb6cc72118e046d2a466aa6adcec4c4923db (diff)
downloadllvm-8ce1e432d1c942d101617b3c623970a4f763f93d.tar.gz
llvm-8ce1e432d1c942d101617b3c623970a4f763f93d.tar.bz2
llvm-8ce1e432d1c942d101617b3c623970a4f763f93d.tar.xz
Make the 'getAsString' function a method of the Attributes class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Attributes.cpp')
-rw-r--r--lib/VMCore/Attributes.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 7d85ecb60d..6047d4b9f0 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -26,66 +26,66 @@ using namespace llvm;
// Attribute Function Definitions
//===----------------------------------------------------------------------===//
-std::string Attribute::getAsString(Attributes Attrs) {
+std::string Attributes::getAsString() const {
std::string Result;
- if (Attrs.hasZExtAttr())
+ if (hasZExtAttr())
Result += "zeroext ";
- if (Attrs.hasSExtAttr())
+ if (hasSExtAttr())
Result += "signext ";
- if (Attrs.hasNoReturnAttr())
+ if (hasNoReturnAttr())
Result += "noreturn ";
- if (Attrs.hasNoUnwindAttr())
+ if (hasNoUnwindAttr())
Result += "nounwind ";
- if (Attrs.hasUWTableAttr())
+ if (hasUWTableAttr())
Result += "uwtable ";
- if (Attrs.hasReturnsTwiceAttr())
+ if (hasReturnsTwiceAttr())
Result += "returns_twice ";
- if (Attrs.hasInRegAttr())
+ if (hasInRegAttr())
Result += "inreg ";
- if (Attrs.hasNoAliasAttr())
+ if (hasNoAliasAttr())
Result += "noalias ";
- if (Attrs.hasNoCaptureAttr())
+ if (hasNoCaptureAttr())
Result += "nocapture ";
- if (Attrs.hasStructRetAttr())
+ if (hasStructRetAttr())
Result += "sret ";
- if (Attrs.hasByValAttr())
+ if (hasByValAttr())
Result += "byval ";
- if (Attrs.hasNestAttr())
+ if (hasNestAttr())
Result += "nest ";
- if (Attrs.hasReadNoneAttr())
+ if (hasReadNoneAttr())
Result += "readnone ";
- if (Attrs.hasReadOnlyAttr())
+ if (hasReadOnlyAttr())
Result += "readonly ";
- if (Attrs.hasOptimizeForSizeAttr())
+ if (hasOptimizeForSizeAttr())
Result += "optsize ";
- if (Attrs.hasNoInlineAttr())
+ if (hasNoInlineAttr())
Result += "noinline ";
- if (Attrs.hasInlineHintAttr())
+ if (hasInlineHintAttr())
Result += "inlinehint ";
- if (Attrs.hasAlwaysInlineAttr())
+ if (hasAlwaysInlineAttr())
Result += "alwaysinline ";
- if (Attrs.hasStackProtectAttr())
+ if (hasStackProtectAttr())
Result += "ssp ";
- if (Attrs.hasStackProtectReqAttr())
+ if (hasStackProtectReqAttr())
Result += "sspreq ";
- if (Attrs.hasNoRedZoneAttr())
+ if (hasNoRedZoneAttr())
Result += "noredzone ";
- if (Attrs.hasNoImplicitFloatAttr())
+ if (hasNoImplicitFloatAttr())
Result += "noimplicitfloat ";
- if (Attrs.hasNakedAttr())
+ if (hasNakedAttr())
Result += "naked ";
- if (Attrs.hasNonLazyBindAttr())
+ if (hasNonLazyBindAttr())
Result += "nonlazybind ";
- if (Attrs.hasAddressSafetyAttr())
+ if (hasAddressSafetyAttr())
Result += "address_safety ";
- if (Attrs & Attribute::StackAlignment) {
+ if (*this & Attribute::StackAlignment) { // FIXME
Result += "alignstack(";
- Result += utostr(Attribute::getStackAlignmentFromAttrs(Attrs));
+ Result += utostr(Attribute::getStackAlignmentFromAttrs(*this));
Result += ") ";
}
- if (Attrs & Attribute::Alignment) {
+ if (*this & Attribute::Alignment) { // FIXME
Result += "align ";
- Result += utostr(Attribute::getAlignmentFromAttrs(Attrs));
+ Result += utostr(Attribute::getAlignmentFromAttrs(*this));
Result += " ";
}
// Trim the trailing space.