aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/ParameterAttributes.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-02-19 21:38:47 +0000
committerDale Johannesen <dalej@apple.com>2008-02-19 21:38:47 +0000
commit0d51e7ec0d2dcbea9e304fd58deb05f37eb75635 (patch)
tree9fbe3f267ddd1719fd5b3e0f95733e786c07fa5c /lib/VMCore/ParameterAttributes.cpp
parenta795aca96aca81ddeb4cd9628138926dd9fa612c (diff)
Expand ParameterAttributes to 32 bits (in preparation
for adding alignment info, not there yet). Clean up interfaces to reference ParameterAttributes consistently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ParameterAttributes.cpp')
-rw-r--r--lib/VMCore/ParameterAttributes.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/VMCore/ParameterAttributes.cpp b/lib/VMCore/ParameterAttributes.cpp
index 344e52c59a..d78068df11 100644
--- a/lib/VMCore/ParameterAttributes.cpp
+++ b/lib/VMCore/ParameterAttributes.cpp
@@ -27,7 +27,7 @@ ParamAttrsList::~ParamAttrsList() {
ParamAttrsLists->RemoveNode(this);
}
-uint16_t
+ParameterAttributes
ParamAttrsList::getParamAttrs(uint16_t Index) const {
unsigned limit = attrs.size();
for (unsigned i = 0; i < limit && attrs[i].index <= Index; ++i)
@@ -44,7 +44,7 @@ bool ParamAttrsList::hasAttrSomewhere(ParameterAttributes attr) const {
}
std::string
-ParamAttrsList::getParamAttrsText(uint16_t Attrs) {
+ParamAttrsList::getParamAttrsText(ParameterAttributes Attrs) {
std::string Result;
if (Attrs & ParamAttr::ZExt)
Result += "zeroext ";
@@ -170,9 +170,10 @@ ParamAttrsList::getModified(const ParamAttrsList *PAL,
const ParamAttrsList *
ParamAttrsList::includeAttrs(const ParamAttrsList *PAL,
- uint16_t idx, uint16_t attrs) {
- uint16_t OldAttrs = PAL ? PAL->getParamAttrs(idx) : 0;
- uint16_t NewAttrs = OldAttrs | attrs;
+ uint16_t idx, ParameterAttributes attrs) {
+ ParameterAttributes OldAttrs = PAL ? PAL->getParamAttrs(idx) :
+ ParamAttr::None;
+ ParameterAttributes NewAttrs = OldAttrs | attrs;
if (NewAttrs == OldAttrs)
return PAL;
@@ -183,9 +184,10 @@ ParamAttrsList::includeAttrs(const ParamAttrsList *PAL,
const ParamAttrsList *
ParamAttrsList::excludeAttrs(const ParamAttrsList *PAL,
- uint16_t idx, uint16_t attrs) {
- uint16_t OldAttrs = PAL ? PAL->getParamAttrs(idx) : 0;
- uint16_t NewAttrs = OldAttrs & ~attrs;
+ uint16_t idx, ParameterAttributes attrs) {
+ ParameterAttributes OldAttrs = PAL ? PAL->getParamAttrs(idx) :
+ ParamAttr::None;
+ ParameterAttributes NewAttrs = OldAttrs & ~attrs;
if (NewAttrs == OldAttrs)
return PAL;
@@ -194,8 +196,8 @@ ParamAttrsList::excludeAttrs(const ParamAttrsList *PAL,
return getModified(PAL, modVec);
}
-uint16_t ParamAttr::typeIncompatible (const Type *Ty) {
- uint16_t Incompatible = None;
+ParameterAttributes ParamAttr::typeIncompatible (const Type *Ty) {
+ ParameterAttributes Incompatible = None;
if (!Ty->isInteger())
// Attributes that only apply to integers.