aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-11 02:44:20 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-11 02:44:20 +0000
commit18da0720887527ed570e9703ae5f290beb491ee1 (patch)
tree9a0a69b4dd6e5a5326680389f76724e0db1b98dd /lib/VMCore/Function.cpp
parent947aa7de67c553a0bbf0ef60173f23a8747014bf (diff)
For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the rest of llvm as a result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index c6bf331ccb..e2a015fabb 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -81,24 +81,24 @@ ParamAttrsList::getParamAttrs(uint16_t Index) const {
for (unsigned i = 0; i < limit; ++i)
if (attrs[i].index == Index)
return attrs[i].attrs;
- return NoAttributeSet;
+ return ParamAttr::None;
}
std::string
ParamAttrsList::getParamAttrsText(uint16_t Attrs) {
std::string Result;
- if (Attrs & ZExtAttribute)
+ if (Attrs & ParamAttr::ZExt)
Result += "zext ";
- if (Attrs & SExtAttribute)
+ if (Attrs & ParamAttr::SExt)
Result += "sext ";
- if (Attrs & NoReturnAttribute)
+ if (Attrs & ParamAttr::NoReturn)
Result += "noreturn ";
- if (Attrs & NoUnwindAttribute)
+ if (Attrs & ParamAttr::NoUnwind)
Result += "nounwind ";
- if (Attrs & InRegAttribute)
+ if (Attrs & ParamAttr::InReg)
Result += "inreg ";
- if (Attrs & StructRetAttribute)
+ if (Attrs & ParamAttr::StructRet)
Result += "sret ";
return Result;
}
@@ -125,7 +125,7 @@ ParamAttrsList::removeAttributes(uint16_t Index, uint16_t Attrs) {
for (unsigned i = 0; i < attrs.size(); ++i)
if (attrs[i].index == Index) {
attrs[i].attrs &= ~Attrs;
- if (attrs[i].attrs == NoAttributeSet)
+ if (attrs[i].attrs == ParamAttr::None)
attrs.erase(&attrs[i]);
return;
}