History log of /external/clang/test/CodeGenCXX/visibility.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
525f2f5437929a324a37697f2934fda78931c66a 09-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196712:
------------------------------------------------------------------------
r196712 | rafael | 2013-12-07 17:13:22 -0800 (Sat, 07 Dec 2013) | 12 lines

Fix pr18174.

Clang outputs LLVM one top level decl at a time. This combined with the
visibility computation code looking for the newest NamespaceDecl would cause
it to produce different results for nested namespaces.

The two options for producing consistent results are
* Delay codegen of anything inside a namespace until the end of the file.
* Don't look for the newest NamespaceDecl.

This patch implements the second option.
This matches the gcc behavior too.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
93ab6bf534fb6c26563c00f28a8fc5581bb71dfd 15-Aug-2013 Stephen Lin <stephenwlin@gmail.com> CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
93cc515d3b99dca18d287d200e19355a2e9c02b2 17-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Compute the visibility of static local variables consistently. Fixes PR16208.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
a2bb8923334ecd35b8f914dff7d105330abbad22 27-Feb-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't cache the visibility of types.

Since r175326 an implicitly hidden template argument can cause a template
installation to become hidden, even if the template itself has an explicit
default visibility. This requires that we keep track of "late" additions
of the visibility attribute.

This is hopefully the last followup change. It just removes the caching of
visibilities from types so that we can see new attributes even after a type has
been used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
b58f810669d9c17bcc025b7560de01d162856f34 27-Feb-2013 Rafael Espindola <rafael.espindola@gmail.com> Use existing macros to simplify the test a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
d3b2f0ac1cedad284d860acd652f28a05bcbcbed 26-Feb-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the most recent decl in getExplicitVisibility.

Now that implicitly hidden template arguments can make an instantiation hidden,
it is important to look at more than just the canonical decl of the argument
in order to see if an attribute is available in a more recent decl.

This has the disadvantage of exposing when getExplicitVisibility is called,
but lets us handle cases like

template <typename T>
struct __attribute__((visibility("default"))) barT {
static void zed() {}
};
class foo;
class __attribute__((visibility("default"))) foo;
template struct barT<foo>;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
3892d022f36ee5bf3be4a55ea01c08d323ef6235 22-Feb-2013 John McCall <rjmccall@apple.com> Ignore visibility from enclosing template arguments
for explicit member specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
d4c3d66be70ae2d0bd828329022dc428cc277a1c 20-Feb-2013 John McCall <rjmccall@apple.com> Add a new 'type_visibility' attribute to allow users to
control the visibility of a type for the purposes of RTTI
and template argument restrictions independently of how
visibility propagates to its non-type member declarations.

Also fix r175326 to not ignore template argument visibility
on a template explicit instantiation when a member has
an explicit attribute but the instantiation does not.

The type_visibility work is rdar://11880378

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
5a758de93fa2a28a84eb0d918a31d9522472990c 16-Feb-2013 John McCall <rjmccall@apple.com> Rework the visibility computation algorithm in preparation
for distinguishing type vs. value visibility.

The changes to the visibility of explicit specializations
are intentional. The change to the "ugly" test case is
a consequence of a sensible implementation, and I am happy
to argue that this is better behavior. Other changes may
or may not be intended; it is quite difficult to divine
intent from some of the code I altered.

I've left behind a comment which I hope explains the
philosophy behind visibility computation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
838dc597e25614c653a062a124b06a04d6b7f5eb 12-Jan-2013 Rafael Espindola <rafael.espindola@gmail.com> Disable caching of visibility.

The testcase in pr14929 shows that this is extremely hard to do. If we choose
to apply the attribute, that causes the visibility of some decls to change and
that can happen really late (during codegen).

Current gcc warns and ignores the attribute in this testcase with a warning.
This suggest that the correct solution is to find a point in the compilation
where we can compute the visibility and
* assert it was never computed before
* reject any attempts to compute it again in the future (with warnings).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
98499013bd70ec584f4c01c45106ec3e8203f16c 31-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Consider the visibility of template template arguments. GCC doesn't, but it also
fails to consider the linkage, which we were already considering.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
6d4a40edb5854d4723e7d25b0e908310b54cc6a0 28-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Add a missing testcase for merging the visibility of two declarations used
as arguments of a template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
becfc2325c9b645d2208b2a5389b709fd3d75576 17-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Record visibility pragmas when we see a tag declaration. We might use it
to build a type before seeing the definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
6b60370ddb5b63e93f25dfbed920be0f335ddad3 13-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Apply visibility pragmas to class template declarations. This is needed because
we might use the declaration to build a type before seeing the definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
d3d02dd0ae17eabc8e0b8972ac6a3863534b39d2 13-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix a bug in my previous commit. The problem is not that we were not using the
canonical decl for the template, but that we were not merging attributes for
templates at all!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
23458208b25acd7d2dfa003b029299e30124fe5f 12-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Use the canonical template decl when trying to find if it has a visibility
attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
5e06529f3bbb4459be21b57dd918880a02f95cb2 12-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Process #pragma visibility early in the parsing of class definitions. Fixes
pr13338.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
8d71918ec9899b07a649ba3a3de2fb6a2e07ec4a 11-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Handle #pragma visibility in explicit specializations and enums.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
f2f15b3bc6820469024db170c87ffe885ec53cf9 11-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't process #pragma visibility during instantiation. The visibility of the
instantiation depends on the template, its arguments and parameters, but not
where it is instantiated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
edb4b626130cc8268b1d7a3f9a9fdc7fb4c3a2bb 11-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> We were computing the visibility and linkage of template parameters, but
only using the linkage.

Use and test both, documenting that considering the visibility and linkage
of template parameters is a difference from gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
41be8cd0593f2e08e41eed218e1b91f419e829a1 25-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't ignore linkage when ignoring visibility in the instantiation of a
method template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
9db614f339f7596e2c0e0e04d6c714cd264ce883 25-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't ignore linkage when ignoring visibility in the instantiation of a
function template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
20831e21ae00ee10e9d9d906f565a66f9fe1d2d1 25-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Consider the linkage for member class templates even when we have to ignore
the visibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
ad359beadbe2b91acf6888546e39083ae74321d9 25-May-2012 Rafael Espindola <rafael.espindola@gmail.com> When ignoring visibility in an instantiation, still consider the linkage.
Similar fixes for function and member template to follow as I write the
testcases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
cae1c623b638f91e848ed81a2510b86b403992e4 21-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Function template version of the previous patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
0b0ad0abd8518742c57d0c6fc01c79982ba2bfdf 21-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Produce a hidden symbol for zed in

struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct HIDDEN bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}

Before we would produce a hidden symbol in

struct HIDDEN foo {
};
template <class P>
struct bar {
};
template <>
struct bar<foo> {
DEFAULT static void zed();
};
void bar<foo>::zed() {
}

But adding HIDDEN to the specialization would cause us to produce a default
symbol.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
2de54fcf8511344d888f445bf159e5dee69cd6b9 21-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Test and document a difference from gcc in the handling of visibility
attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
797105a45a838a7c1cefd05dec3fd0cbaeb0a215 16-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix the visibility of instantiations of static data members.
Fixes pr12835.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
31c195ac0f3869e742d42f9d02b6cd33442fb630 15-May-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix our handling of visibility in explicit template instantiations.

* Don't copy the visibility attribute during instantiations. We have to be able
to distinguish

struct HIDDEN foo {};
template<class T>
DEFAULT void bar() {}
template DEFAULT void bar<foo>();

from

struct HIDDEN foo {};
template<class T>
DEFAULT void bar() {}
template void bar<foo>();

* If an instantiation has an attribute, it takes precedence over an attribute
in the template.

* With instantiation attributes handled with the above logic, we can now
select the minimum visibility when looking at template arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
923b0c93375db7e75a02bceb487f6f3d3da2766f 23-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix visibility when we have two types with explicit visibility in a template
argument list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
546ee6dbcafa8a0dc6342497573fafa560be66f8 23-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Add another testcase that was not being covered.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
a5416bd3caae812563eea12b3b2e21da9c5b5904 23-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Add a testcase that we already get right but was not being tested. Found
by a chrome build on OS X. Thanks to Nico Weber for testing a patch and
providing the .ii file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
71776efce59509b127a02f385c3df9686b852d62 22-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Cleanup testcase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
f6a8b9cba4893b552704f64dd279b4cdc8c13f6f 22-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> An attribute in a explicit template installation should take precedence over
the tempale arguments in deciding the visibility.

This agrees with gcc 4.7.

Found by trying to build chrome with component=shared_library with 155314
reverted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
51183374a54448c54f1b53035cea5b8d885c1c82 22-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Revert 155102 but add a fixme while I debug what is wrong with chrome's
components build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
a77e0726341a4afbe9c25b05cf944edf17f64543 22-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Add another missing testcase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
bc356d0aa9c25c0831fa0ae9830b5e5e4be23b0a 22-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Add a testcase we were already getting right, but were not testing for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
60115a0453ecfbfe215fdb10aceab983e5f802ef 22-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix handling of template parameters. Found by inspection. GCC 4.7 agrees
with this testcase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
c7e606086a8d44c4e84ac3d47289288534c79bc6 19-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> In mergeVisibility, if we already have an explicit visibility, keep it.
This fixes the included testcase and lets us simplify the code a bit. It
does require using mergeWithMin when merging class information to its
members. Expand the comments to explain why that works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
1c7eed7e6ea2b357aa94581a90018ddbdcb41cbf 19-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> In mergeVisibilityWithMin, let an implicit hidden symbol take precedence over
an explicit default one. This means that with -fvisibility hidden we
now produce a hidden symbol for

template <typename T>
class DEFAULT foo {
void bar() {}
};
class zed {};
template class foo<zed>;

This matches the behaviour of gcc 4.7.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
e9836a27cf93a58305ff3cf6d75ddc399c7d8ebf 16-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Revert r154749 for now at John McCall's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
767f7c7558779e7feb4fe10960726dbf01e69a9f 14-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Consider visibility attributes last, so that they take precedence.
I am working on a cleaner fix, but this gets the case in PR12552 passing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
2f47c366bcc28f54f22df6b4266b5d14de302ced 10-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> The type of a definition should not increase its visibility. Fixes PR12221.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
860097c4ee7a365b6d462436659082c8355e03fd 23-Feb-2012 Rafael Espindola <rafael.espindola@gmail.com> Two fixes to how we compute visibility:

* Handle some situations where we should never make a decl more visible,
even when merging in an explicit visibility.

* Handle attributes in members of classes that are explicitly specialized.

Thanks Nico for the report and testing, Eric for the initial review, and dgregor
for the awesome test27 :-)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
093ecc92afb70f6125d249eef31f40c0c57b7d24 14-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Remember if a type has its visibility set explicitly or implicitly.
With that, centralize the way we merge visibility, always preferring explicit over
implicit and then picking the most restrictive one.
Fixes pr10113 and pr11690.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
256fc4d0743d520a2535d6de003aa828f5de8b27 04-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Process attributes in explicit function template instantiations. Fixes part of
PR11690.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
0257b7fbbe2e48bdc4c435a275b5daac195fb1cb 03-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Process attributes in explicit template instatiation definitions. Fixes PR11690.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
b5d763d87c8ffb969b4d4a59ed98a2e3516e0850 02-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Small cosmetic cleanups in code I will change anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
71cb8a2e10c3f75ca50e2b4f205cbd4cec40ad5e 01-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Consider visibility attributes in namespaces as being explicit. I.e., they
take precedence over command line options. Fixes PR10113.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
fc038e9ef8ed262724f42597ca5c844de97b1202 17-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Remove a non-gcc-compatible extension that would apply attributes on declarations without a declarator to structs. Add a warning for ignored attributes. Patch by Michael Han.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
bf1c5aeadc5d4bb7fca5b0ee12208a94971f8492 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
6ce51ee94bd300c5f30930d96436fd53e4ea89a7 28-Jun-2011 John McCall <rjmccall@apple.com> Don't factor in visibility for templates and template arguments
for explicit specializations with their own explicit visibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
1a0918ade0a3490c7aff243f9cd519156dfcb0bd 04-Mar-2011 John McCall <rjmccall@apple.com> Don't consider visibility from template parameter lists if we're
computing for a nested decl with explicit visibility. This is all part
of the general philosophy of explicit visibility attributes, where
any information that was obviously available at the attribute site
should probably be ignored. Fixes PR9371.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
f502d93b0ea970bfbd897e657f8d940a20984de2 24-Jan-2011 Anders Carlsson <andersca@mac.com> Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the exception of explicit template instantiations, which have to be weak_odr.

This fixes PR6996.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
cd3ac4bd96cb19af5117eded84bfe8320c5d787e 15-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Also set unnamed_addr on declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
62b1607e440b26f3683c92be887e8fd94af9c904 13-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Only add unnamed_addr to definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
82a0f4e93c055fb12f5ad7c3d146d50eb201308f 11-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Set unnamed_addr in VTTs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
9f959db60e8913abafe7d5f5f5a83dc6a5c8d87e 11-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add unnamed_addr to vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
2b364a43f50efd3d82177c29a79e66895ab335ad 18-Dec-2010 John McCall <rjmccall@apple.com> Fix test. I added one last test and then forget to re-check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
7f1b98760d419a09b2261c1ef901f6bc1ff33e19 18-Dec-2010 John McCall <rjmccall@apple.com> Apply attributes to explicit specializations. Specializations which
don't provide their own explicit visibility attributes should get them
from the template. Fixes rdar://problem/8778497.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
112c967bd5c862a0f5d7913aa06700c048807db8 02-Nov-2010 John McCall <rjmccall@apple.com> Ensure that static local variables in function templates inherit the
visibility of their function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
3698748400478880d2a146ef9eaa111cd0e60522 02-Nov-2010 John McCall <rjmccall@apple.com> Ignore attributes on classes when calculating visibility for members
with their own explicit visibility attributes. Basically we only want to
apply a single visibility attribute from any particular ancestry.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
af14603ca61757cf4361b583b45639a04c57e651 30-Oct-2010 John McCall <rjmccall@apple.com> Better solution: calculate the visibility of functions and variables
independently of whether they're definitions, then teach IR generation to
ignore non-explicit visibility when emitting declarations. Use this to
make sure that RTTI, vtables, and VTTs get the right visibility.

More of rdar://problem/8613093



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
ee30102a9ef32cdbf0afe0e4c07a53d265a18f98 30-Oct-2010 John McCall <rjmccall@apple.com> GCC faithfully calculates visibility for variables independently of
whether it's a declaration or not, then ignores that information for
declarations unless it was explicitly given. It's not totally clear
how that should be mapped into a sane system, but make an effort.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
110e8e56af30363072c140285961592b0107f789 30-Oct-2010 John McCall <rjmccall@apple.com> Restore r117644, this time properly ignoring -fvisibility and type visibility
for namespace-scope variable declarations.

Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
034f55c1eb93aee61cef5a015eb1d5ba06d3b3d4 29-Oct-2010 Daniel Dunbar <daniel@zuster.org> Revert r117644, "Apply visibility in IR gen to variables that are merely
declared", it breaks things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
87a4ed905e2febe64021dcdfcdc7f00b27e92f32 29-Oct-2010 John McCall <rjmccall@apple.com> Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
0df9587ab011c12968fcbe3518666b2117afe350 29-Oct-2010 John McCall <rjmccall@apple.com> When computing the visibility of a class member, calculate the visibility
of its context without considering global settings like -fvisibility=hidden.
Fixes PR8492.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
67fa6d5ea630c800c3c96e129129aba93d1487c2 28-Oct-2010 John McCall <rjmccall@apple.com> Abandon the type-visibility optimization for functions. GCC doesn't do it,
and it's too much trouble to push for. Fixes PR8478.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
ac65c6208d48b0f9b4661c30c28997a280ac5ba6 26-Oct-2010 John McCall <rjmccall@apple.com> A couple of tweaks to the visibility rules:
- tags with C linkage should ignore visibility=hidden
- functions and variables with explicit visibility attributes should
ignore the linkage of their types
Either of these should be sufficient to fix PR8457.

Also, FileCheck-ize a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
1fb0caaa7bef765b85972274e3b434af2572c141 22-Oct-2010 John McCall <rjmccall@apple.com> Substantially revise how clang computes the visibility of a declaration to
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
c66bcfd32b941d8008284ecae9d16d7d47c96b0b 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Make sure to set the visible on a vtable; VTTs and typeinfo already
handle visibility properly. Fixes <rdar://problem/8091955>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp
39de84d671bac60662251e98f20a5a6039795dfc 07-Feb-2010 Anders Carlsson <andersca@mac.com> Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.

(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/visibility.cpp