diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-09 07:45:08 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-09 07:45:08 +0000 |
commit | c9b22d735a921e335bc02aea0bd4695c5a3e52a9 (patch) | |
tree | dbe50cfd0e6565cc868b4210a199c95a9fee5fb7 /llvm/lib/AsmParser/LLParser.cpp | |
parent | 3b95e4da76df2084315368dca15a31a99fd3150e (diff) | |
download | bcm5719-llvm-c9b22d735a921e335bc02aea0bd4695c5a3e52a9.tar.gz bcm5719-llvm-c9b22d735a921e335bc02aea0bd4695c5a3e52a9.zip |
Create enums for the different attributes.
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.
llvm-svn: 165488
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index a0002ee4bca..d813d67e954 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -2779,7 +2779,8 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { AttrListPtr PAL = AttrListPtr::get(Attrs); - if (PAL.getParamAttributes(1).hasStructRetAttr() && !RetType->isVoidTy()) + if (PAL.getParamAttributes(1).hasAttribute(Attributes::StructRet) && + !RetType->isVoidTy()) return Error(RetTypeLoc, "functions with 'sret' argument must return void"); FunctionType *FT = |