]> granicus.if.org Git - clang/commit
Implement __attribute__((internal_linkage)).
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 10 Nov 2015 21:28:44 +0000 (21:28 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 10 Nov 2015 21:28:44 +0000 (21:28 +0000)
commitb964ad11c0eeecf0f82cdf04a688ce76c7b1db69
treefd52a0f43903d13963b96530040efa5692b62df4
parent1ae6ec457431c0d9a72fbef221a3fb766e3fdb41
Implement __attribute__((internal_linkage)).

The attrubite is applicable to functions and variables and changes
the linkage of the subject to internal.

This is the same functionality as C-style "static", but applicable to
class methods; and the same as anonymouns namespaces, but can apply
to individual methods of a class.

Following the proposal in
http://lists.llvm.org/pipermail/cfe-dev/2015-October/045580.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252648 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/AST/Decl.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
test/CodeGenCXX/attribute_internal_linkage.cpp [new file with mode: 0644]
test/Sema/attr-coldhot.c
test/Sema/attr-notail.c
test/Sema/internal_linkage.c [new file with mode: 0644]
test/SemaCXX/internal_linkage.cpp [new file with mode: 0644]