]> granicus.if.org Git - clang/commit
Add support for attribute 'noescape'.
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 22 Sep 2017 00:41:05 +0000 (00:41 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 22 Sep 2017 00:41:05 +0000 (00:41 +0000)
commitd6b1e9271c5c8ab378dfc5dfefdc2b3593f14f13
treee330413b337463477ee28fe9920e7898971602c5
parent0702d2e7fe5998912a9979391f64ef6bdd540f00
Add support for attribute 'noescape'.

The attribute informs the compiler that the annotated pointer parameter
of a function cannot escape and enables IRGen to attach attribute
'nocapture' to parameters that are annotated with the attribute. That is
the only optimization that currently takes advantage of 'noescape', but
there are other optimizations that will be added later that improves
IRGen for ObjC blocks.

This recommits r313722, which was reverted in r313725 because clang
couldn't build compiler-rt. It failed to build because there were
function declarations that were missing 'noescape'. That has been fixed
in r313929.

rdar://problem/19886775

Differential Revision: https://reviews.llvm.org/D32210

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313945 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/Type.h
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/ASTContext.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/TypePrinter.cpp
lib/CodeGen/CGCall.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaType.cpp
test/Misc/ast-dump-attr.cpp
test/Misc/pragma-attribute-supported-attributes-list.test