diff options
author | Tres Popp <tpopp@google.com> | 2020-09-29 10:24:54 +0200 |
---|---|---|
committer | Tres Popp <tpopp@google.com> | 2020-09-29 10:31:04 +0200 |
commit | eb9f7c28e5fe6d75fed3587023e17f2997c8024b (patch) | |
tree | ae988a9b545aa266e6a2e8a3674c34400539a5ae /clang/lib/CodeGen/CGCall.cpp | |
parent | 297ec611304663931be52e6118d9f135ceb8a027 (diff) | |
download | llvm-eb9f7c28e5fe6d75fed3587023e17f2997c8024b.zip llvm-eb9f7c28e5fe6d75fed3587023e17f2997c8024b.tar.gz llvm-eb9f7c28e5fe6d75fed3587023e17f2997c8024b.tar.bz2 |
Revert "OpaquePtr: Add type to sret attribute"
This reverts commit 55c4ff91bd820d72014f63dcf7f3d5a0d3397986.
Issues were introduced as discussed in https://reviews.llvm.org/D88241
where this change made previous bugs in the linker and BitCodeWriter
visible.
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 dd3f856..ec7ddf8 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2144,7 +2144,7 @@ void CodeGenModule::ConstructAttributeList( // Attach attributes to sret. if (IRFunctionArgs.hasSRetArg()) { llvm::AttrBuilder SRETAttrs; - SRETAttrs.addStructRetAttr(getTypes().ConvertTypeForMem(RetTy)); + SRETAttrs.addAttribute(llvm::Attribute::StructRet); hasUsedSRet = true; if (RetAI.getInReg()) SRETAttrs.addAttribute(llvm::Attribute::InReg); @@ -2279,7 +2279,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.addStructRetAttr(getTypes().ConvertTypeForMem(ParamType)); + Attrs.addAttribute(llvm::Attribute::StructRet); hasUsedSRet = true; } |