diff options
author | Tim Northover <tnorthover@apple.com> | 2014-03-29 13:28:05 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-03-29 13:28:05 +0000 |
commit | e77cc39afff8b9bedbd5a3be6fdbeef5e786184f (patch) | |
tree | ea8fcd7c22a75c9434eb859d3d093f6a4247ea9a /clang/lib/CodeGen/CGCall.cpp | |
parent | e8fba987355caf92749e25a9f50b4f1ed1006fcf (diff) | |
download | bcm5719-llvm-e77cc39afff8b9bedbd5a3be6fdbeef5e786184f.tar.gz bcm5719-llvm-e77cc39afff8b9bedbd5a3be6fdbeef5e786184f.zip |
ObjC: allow targets to decide when to use stret for blocks.
This was originally part of the ARM64 patch, but seems semantically
separate.
llvm-svn: 205097
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 6d5324d4a13..6bef76934e6 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -878,6 +878,11 @@ bool CodeGenModule::ReturnTypeUsesSRet(const CGFunctionInfo &FI) { return FI.getReturnInfo().isIndirect(); } +bool CodeGenModule::ReturnSlotInterferesWithArgs(const CGFunctionInfo &FI) { + return ReturnTypeUsesSRet(FI) && + getTargetCodeGenInfo().doesReturnSlotInterfereWithArgs(); +} + bool CodeGenModule::ReturnTypeUsesFPRet(QualType ResultType) { if (const BuiltinType *BT = ResultType->getAs<BuiltinType>()) { switch (BT->getKind()) { |