summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-06-15 23:02:42 +0000
committerJohn McCall <rjmccall@apple.com>2011-06-15 23:02:42 +0000
commit31168b077c3687bb79985102b08718cd77db353d (patch)
tree489434d90661950c25716a5db40be446d933c95c /clang/lib/CodeGen/TargetInfo.h
parentce45f88e451387c46bfd6b53c75c7fa72b730ba1 (diff)
downloadbcm5719-llvm-31168b077c3687bb79985102b08718cd77db353d.tar.gz
bcm5719-llvm-31168b077c3687bb79985102b08718cd77db353d.zip
Automatic Reference Counting.
Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.h')
-rw-r--r--clang/lib/CodeGen/TargetInfo.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.h b/clang/lib/CodeGen/TargetInfo.h
index 4f59eb619e9..dbb09b1614d 100644
--- a/clang/lib/CodeGen/TargetInfo.h
+++ b/clang/lib/CodeGen/TargetInfo.h
@@ -111,6 +111,20 @@ namespace clang {
const llvm::Type* Ty) const {
return Ty;
}
+
+ /// Retrieve the address of a function to call immediately before
+ /// calling objc_retainAutoreleasedReturnValue. The
+ /// implementation of objc_autoreleaseReturnValue sniffs the
+ /// instruction stream following its return address to decide
+ /// whether it's a call to objc_retainAutoreleasedReturnValue.
+ /// This can be prohibitively expensive, depending on the
+ /// relocation model, and so on some targets it instead sniffs for
+ /// a particular instruction sequence. This functions returns
+ /// that instruction sequence in inline assembly, which will be
+ /// empty if none is required.
+ virtual llvm::StringRef getARCRetainAutoreleasedReturnValueMarker() const {
+ return "";
+ }
};
}
OpenPOWER on IntegriCloud