mangler. Now member functions and pointers thereof have their calling
convention mangled as __thiscall if they have the default CC (even though,
they technically still have the __cdecl CC).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118598 91177308-0d34-0410-b5e6-96231b3b80d8
there's no return adjustment from the overridden to the overrider doesn't
mean there isn't a return adjustment from the overrider to the final
overrider. This matters if we're emitting a virtual this-adjustment thunk
because the overrider virtually inherits from the class providing the
nearest overridden method. Do the appropriate return adjustment in this case.
Fixes PR7611.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118466 91177308-0d34-0410-b5e6-96231b3b80d8
data members by delaying the emission of the initializer until after
linkage and visibility have been set on the global. Also, don't
emit a guard unless the variable actually ends up with vague linkage,
and don't use thread-safe statics in any case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118336 91177308-0d34-0410-b5e6-96231b3b80d8
e.g. for:
template <int i> class A {
class B *g;
};
'class B' has the template as lexical context but semantically it is
introduced in namespace scope.
Fixes rdar://8611125 & http://llvm.org/PR8505
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118235 91177308-0d34-0410-b5e6-96231b3b80d8
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
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
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
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
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
- 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
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
by marking the decl invalid isn't. Make some steps towards supporting these
and then hastily shut them down at the last second by marking them as
unsupported.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116661 91177308-0d34-0410-b5e6-96231b3b80d8
arguments in either the placement or constructor arguments. This is
important if the default arguments refer to a declaration or create a
temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115700 91177308-0d34-0410-b5e6-96231b3b80d8
a EH-only cleanup as part of a fallthrough branch-through. That this happens
for this test case is actually a separate bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115668 91177308-0d34-0410-b5e6-96231b3b80d8