summaryrefslogtreecommitdiff
path: root/lib/AsmParser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index a0002ee4bc..d813d67e95 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/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 =