diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-11 02:44:20 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-11 02:44:20 +0000 |
commit | a472f66dd0ec371399ed5d52271dff4f58833eb0 (patch) | |
tree | 7552d0bd1980e118653eaa9160d1119ec6f26287 /llvm/lib/VMCore/Function.cpp | |
parent | d3f622e0d5216247d773532bed0a9ec47d021f07 (diff) | |
download | bcm5719-llvm-a472f66dd0ec371399ed5d52271dff4f58833eb0.tar.gz bcm5719-llvm-a472f66dd0ec371399ed5d52271dff4f58833eb0.zip |
For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.
llvm-svn: 35877
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
-rw-r--r-- | llvm/lib/VMCore/Function.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index c6bf331ccb2..e2a015fabbb 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/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; } |