diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-09-19 23:54:18 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-09-19 23:54:18 +0000 |
commit | e603fe46649aee6f6aeca1668f0b617818af1e1d (patch) | |
tree | 179fb8d6b426bf5f249d798f61e1085c1697a7af /lib/AsmParser | |
parent | f5958e9dea9daf6843f44686bc9d8b19155465e4 (diff) | |
download | external_llvm-e603fe46649aee6f6aeca1668f0b617818af1e1d.zip external_llvm-e603fe46649aee6f6aeca1668f0b617818af1e1d.tar.gz external_llvm-e603fe46649aee6f6aeca1668f0b617818af1e1d.tar.bz2 |
Convert some attribute existence queries over to use the predicate methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index b0b64d8..2e4af3a 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2726,16 +2726,16 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { std::vector<Type*> ParamTypeList; SmallVector<AttributeWithIndex, 8> Attrs; - if (RetAttrs != Attribute::None) + if (RetAttrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(0, RetAttrs)); for (unsigned i = 0, e = ArgList.size(); i != e; ++i) { ParamTypeList.push_back(ArgList[i].Ty); - if (ArgList[i].Attrs != Attribute::None) + if (ArgList[i].Attrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(i+1, ArgList[i].Attrs)); } - if (FuncAttrs != Attribute::None) + if (FuncAttrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(~0, FuncAttrs)); AttrListPtr PAL = AttrListPtr::get(Attrs); @@ -3253,7 +3253,7 @@ bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) { // Set up the Attributes for the function. SmallVector<AttributeWithIndex, 8> Attrs; - if (RetAttrs != Attribute::None) + if (RetAttrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(0, RetAttrs)); SmallVector<Value*, 8> Args; @@ -3274,14 +3274,14 @@ bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) { return Error(ArgList[i].Loc, "argument is not of expected type '" + getTypeString(ExpectedTy) + "'"); Args.push_back(ArgList[i].V); - if (ArgList[i].Attrs != Attribute::None) + if (ArgList[i].Attrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(i+1, ArgList[i].Attrs)); } if (I != E) return Error(CallLoc, "not enough parameters specified for call"); - if (FnAttrs != Attribute::None) + if (FnAttrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(~0, FnAttrs)); // Finish off the Attributes and check them @@ -3649,7 +3649,7 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS, // Set up the Attributes for the function. SmallVector<AttributeWithIndex, 8> Attrs; - if (RetAttrs != Attribute::None) + if (RetAttrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(0, RetAttrs)); SmallVector<Value*, 8> Args; @@ -3670,14 +3670,14 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS, return Error(ArgList[i].Loc, "argument is not of expected type '" + getTypeString(ExpectedTy) + "'"); Args.push_back(ArgList[i].V); - if (ArgList[i].Attrs != Attribute::None) + if (ArgList[i].Attrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(i+1, ArgList[i].Attrs)); } if (I != E) return Error(CallLoc, "not enough parameters specified for call"); - if (FnAttrs != Attribute::None) + if (FnAttrs.hasAttributes()) Attrs.push_back(AttributeWithIndex::get(~0, FnAttrs)); // Finish off the Attributes and check them |