diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-12 15:18:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-12 15:18:55 +0000 |
commit | f1588660c109610e6a79c786b83b7c9bbd6ed31e (patch) | |
tree | bb583c0e0ed23ec30f771b93299e5800f1519252 /lib/CodeGen/CGClass.cpp | |
parent | d248619cd1a5e13bb8fb19e97e3e923d792bfea3 (diff) |
Improve name mangling for instantiation-dependent types that are not
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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
0 files changed, 0 insertions, 0 deletions