]> granicus.if.org Git - clang/commit
Fix mangled name of method with ns_consumed parameters.
authorNico Weber <nicolasweber@gmx.de>
Wed, 25 May 2016 14:15:08 +0000 (14:15 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 25 May 2016 14:15:08 +0000 (14:15 +0000)
commit5c9885d453be4a1239730fd1362305e48f554c9b
treefd70e32abc4c7c1a313422602cda65180f14c9d3
parent1c3b22987674a09aeb2d7dcc65cfc2d2d722e39b
Fix mangled name of method with ns_consumed parameters.

When a function/method use a parameter with "ns_consumed" attribute,
ensure that the mangled name is the same whether -fobjc-arc is used
or not.

Since "ns_consumed" attribute is generally used to inform ARC that
a function/method does sink the reference, it mean it is usually
implemented in a compilation unit compiled without -fobjc-arc but
used form a compilation unit compiled with it.

Originally found while trying to use "ns_consumed" attribute in an
Objective-C++ file in Chromium (http://crbug.com/599980) where it
caused a linker error.

Regression introduced by revision 262278 (previously the attribute
was incorrectly not part of the mangled name).

Patch from Sylvain Defresne <sdefresne@chromium.org>!
http://reviews.llvm.org/D20113

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270702 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ItaniumMangle.cpp
test/CodeGenObjCXX/arc-attrs.mm
test/CodeGenObjCXX/arc-mangle.mm
test/CodeGenObjCXX/mangle.mm