diff options
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 0d050dc..93be1b8 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2139,7 +2139,7 @@ void CodeGenModule::ConstructAttributeList( // Attach attributes to sret. if (IRFunctionArgs.hasSRetArg()) { llvm::AttrBuilder SRETAttrs; - SRETAttrs.addAttribute(llvm::Attribute::StructRet); + SRETAttrs.addStructRetAttr(getTypes().ConvertTypeForMem(RetTy)); hasUsedSRet = true; if (RetAI.getInReg()) SRETAttrs.addAttribute(llvm::Attribute::InReg); @@ -2274,7 +2274,7 @@ void CodeGenModule::ConstructAttributeList( // Add 'sret' if we haven't already used it for something, but // only if the result is void. if (!hasUsedSRet && RetTy->isVoidType()) { - Attrs.addAttribute(llvm::Attribute::StructRet); + Attrs.addStructRetAttr(getTypes().ConvertTypeForMem(ParamType)); hasUsedSRet = true; } |