| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Compute mangling numbers for externally visible local variables and tags.
Change the mangler to consistently use discriminators where necessary.
Tweak the scheme we use to number decls which are not externally visible
to avoid unnecessary discriminators in common cases now that we request
them more consistently.
Fixes <rdar://problem/14204721>.
llvm-svn: 185986
|
| |
|
|
| |
llvm-svn: 182773
|
| |
|
|
| |
llvm-svn: 174688
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This corrects the mangling and linkage of classes (& their member functions) in
cases like this:
struct foo {
struct {
void func() { ... }
} x;
};
we were accidentally giving this nested unnamed struct 'no' linkage where it
should've had the linkage of the outer class. The mangling was incorrecty too,
mangling as TU-wide unnamed type mangling of $_X rather than class-scoped
mangling of UtX_.
This also fixes -Wunused-member-function which would incorrectly diagnose
'func' as unused due to it having no linkage & thus appearing to be TU-local
when in fact it might be correctly used in another TU.
Similar mangling should be applied to function local classes in similar cases
but I've deferred that for a subsequent patch.
Review/discussion by Richard Smith, John McCall, & especially Eli Friedman.
llvm-svn: 167906
|
| |
|
|
| |
llvm-svn: 163846
|
| |
|
|
| |
llvm-svn: 163829
|
| |
|
|
|
|
|
|
|
| |
mangling of floating-point literals. I just went ahead and
reimplemented toString() here; if someone wants to generalize
the library routine to do this, or feels strongly that we should
be post-processing, please feel free.
llvm-svn: 149256
|
| |
|
|
|
|
|
|
|
|
| |
values and non-type template arguments of integral and enumeration types.
This change causes some legal C++98 code to no longer compile in C++11 mode, by
enforcing the C++11 rule that narrowing integral conversions are not permitted
in the final implicit conversion sequence for the above cases.
llvm-svn: 148439
|
| |
|
|
|
|
| |
-std=c++0x. Patch by Ahmed Charles!
llvm-svn: 141900
|
| |
|
|
|
|
| |
constructor might not be trivial (if there is an in-class initializer for some member) and might be deleted.
llvm-svn: 139991
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dependent. This covers an odd class of types such as
int (&)[sizeof(sizeof(T() + T()))];
which involve template parameters but, because of some trick typically
involving a form of expression that is never type-dependent, resolve
down to a non-dependent type. Such types need to be mangled
essentially as they were written in the source code (involving
template parameters), rather than via their canonical type.
In general, instantiation-dependent types should be mangled as
they were written in the source. However, since we can't do that now
without non-trivial refactoring of the AST (see the new FIXME), I've
gone for this partial solution: only use the as-written-in-the-source
mangling for these strange types that are instantiation-dependent but
not dependent. This provides better compatibility with previous
incarnations of Clang and with GCC. In the future, we'd like to get
this right.
Fixes <rdar://problem/9663282>.
llvm-svn: 134984
|
| |
|
|
| |
llvm-svn: 134974
|
| |
|
|
| |
llvm-svn: 134967
|
| |
|
|
|
|
| |
non-instantiation-dependent sizeof and alignof expressions.
llvm-svn: 134963
|
| |
|
|
| |
llvm-svn: 134932
|
| |
|
|
|
|
|
| |
This is kindof questionable but seems to do more-or-less the right thing.
This is not a particularly friendly part of the ABI.
llvm-svn: 134227
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type/expression/template argument/etc. is instantiation-dependent if
it somehow involves a template parameter, even if it doesn't meet the
requirements for the more common kinds of dependence (dependent type,
type-dependent expression, value-dependent expression).
When we see an instantiation-dependent type, we know we always need to
perform substitution into that instantiation-dependent type. This
keeps us from short-circuiting evaluation in places where we
shouldn't, and lets us properly implement C++0x [temp.type]p2.
In theory, this would also allow us to properly mangle
instantiation-dependent-but-not-dependent decltype types per the
Itanium C++ ABI, but we aren't quite there because we still mangle
based on the canonical type in cases like, e.g.,
template<unsigned> struct A { };
template<typename T>
void f(A<sizeof(sizeof(decltype(T() + T())))>) { }
template void f<int>(A<sizeof(sizeof(int))>);
and therefore get the wrong answer.
llvm-svn: 134225
|
| |
|
|
|
|
|
| |
that serve as the base template name of an unresolved-name to
be mangled as a substitution.
llvm-svn: 134213
|
| |
|
|
| |
llvm-svn: 134011
|
| |
|
|
|
|
| |
use the unresolved-name production correctly.
llvm-svn: 133554
|
| |
|
|
|
|
|
|
| |
if they match that production, i.e. if they're template type parameters
or decltypes (or, as an obvious case not yet described in the ABI document,
if they're template template parameters applied to template arguments).
llvm-svn: 130824
|
| |
|
|
|
|
|
|
|
|
| |
Patch authored by John Wiegley.
These type traits are used for parsing code that employs certain features of
the Embarcadero C++ compiler. Several of these constructs are also desired by
libc++, according to its project pages (such as __is_standard_layout).
llvm-svn: 130342
|
| |
|
|
|
|
|
| |
function as a template argument where a pointer to function is wanted.
Just extend the existing hack.
llvm-svn: 130084
|
| |
|
|
|
|
|
|
|
|
| |
I've sent off an email requesting clarification on a few things that
I wasn't sure how to handle.
This also necessitated making prefixes and unresolved-prefixes get
mangled separately.
llvm-svn: 130083
|
| |
|
|
|
|
|
| |
APInt::toString doesn't do those, but it's easy to postprocess that output,
and that's probably better than adding another knob to that method.
llvm-svn: 130081
|
| |
|
|
|
|
|
|
| |
they don't collide with file-scope extern functions from the same
translation unit. This is basically a matter of applying the same
logic to FunctionDecls as we were previously applying to VarDecls.
llvm-svn: 128072
|
| |
|
|
|
|
| |
element type. Fixes rdar://problem/8913416.
llvm-svn: 124315
|
| |
|
|
| |
llvm-svn: 118236
|
| |
|
|
|
|
| |
// rdar: //8620510 and PR7666
llvm-svn: 118019
|
| |
|
|
| |
llvm-svn: 111591
|
| |
|
|
|
|
|
|
| |
mangleCallExpression. Also, operator names with unknown arity should
be mangled as binary operators; this is actually covered by an oddly-
positioned sentence in the ABI document. Fixes PR7891.
llvm-svn: 111395
|
| |
|
|
|
|
| |
dependent call expression.
llvm-svn: 111300
|
| |
|
|
|
|
|
| |
these, but it's convenient to mangle them when deferring them (in the 99.99%
case where it's not an anonymous union, of course).
llvm-svn: 110381
|
| |
|
|
| |
llvm-svn: 109315
|
| |
|
|
|
|
|
| |
linkage specification. Not sure if this is the ideal fix, but I'm reasonably
sure it's correct vs. gcc.
llvm-svn: 108656
|
| |
|
|
|
|
|
|
| |
follow <name>; instead they follow <type>, which has <name> as a subset.
Fixes PR7446.
llvm-svn: 108326
|
| |
|
|
| |
llvm-svn: 105312
|
| |
|
|
| |
llvm-svn: 105311
|
| |
|
|
|
|
|
|
| |
just integer-literal expressions with special case implementations in the AST.
Fixes rdar://problem/7825453.
llvm-svn: 100905
|
| |
|
|
|
|
|
|
| |
Remove -faccess-control from -cc1; add -fno-access-control.
Make the driver pass -fno-access-control by default.
Update a bunch of tests to be correct under access control.
llvm-svn: 100880
|
| |
|
|
|
|
| |
Fixes PR6625.
llvm-svn: 98707
|
| |
|
|
|
|
|
|
|
| |
iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.
llvm-svn: 98441
|
| |
|
|
|
|
| |
to look incompetent
llvm-svn: 98425
|
| |
|
|
| |
llvm-svn: 98424
|
| |
|
|
|
|
| |
amiss
llvm-svn: 98332
|
| |
|
|
|
|
| |
them). Fixes PR6578.
llvm-svn: 98328
|
| |
|
|
| |
llvm-svn: 98254
|
| |
|
|
|
|
|
|
|
|
|
| |
category. Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing. Provide terrible manglings for typeof. Mangle
decltype with some hope of accuracy.
Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.
llvm-svn: 97523
|
| |
|
|
| |
llvm-svn: 97479
|
| |
|
|
|
|
| |
some failure here that I can't.
llvm-svn: 96612
|