summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit89268bc6e2c11c951d1c37f100696bff48d58fbf (patch)
tree7a654c3dd76155923833fd2ae7636110938cf813 /llvm/lib/VMCore/ParameterAttributes.cpp
parent4ae998528531ad6719d3503fce1e72e5a4d589b6 (diff)
downloadbcm5719-llvm-89268bc6e2c11c951d1c37f100696bff48d58fbf.tar.gz
bcm5719-llvm-89268bc6e2c11c951d1c37f100696bff48d58fbf.zip
Expand ParameterAttributes to 32 bits (in preparation
for adding alignment info, not there yet). Clean up interfaces to reference ParameterAttributes consistently. llvm-svn: 47342
Diffstat (limited to 'llvm/lib/VMCore/ParameterAttributes.cpp')
-rw-r--r--llvm/lib/VMCore/ParameterAttributes.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/llvm/lib/VMCore/ParameterAttributes.cpp b/llvm/lib/VMCore/ParameterAttributes.cpp
index 344e52c59a4..d78068df113 100644
--- a/llvm/lib/VMCore/ParameterAttributes.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud