summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-03-29 13:28:05 +0000
committerTim Northover <tnorthover@apple.com>2014-03-29 13:28:05 +0000
commite77cc39afff8b9bedbd5a3be6fdbeef5e786184f (patch)
treeea8fcd7c22a75c9434eb859d3d093f6a4247ea9a /clang/lib/CodeGen/CGCall.cpp
parente8fba987355caf92749e25a9f50b4f1ed1006fcf (diff)
downloadbcm5719-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.cpp5
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()) {
OpenPOWER on IntegriCloud