History log of /external/clang/lib/AST/MicrosoftMangle.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/AST/MicrosoftMangle.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/AST/MicrosoftMangle.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/AST/MicrosoftMangle.cpp
01f3d00bc5074a2f105eda35ef7aee8088e938d6 10-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196771:
------------------------------------------------------------------------
r196771 | majnemer | 2013-12-09 02:44:32 -0800 (Mon, 09 Dec 2013) | 17 lines

[-cxx-abi microsoft] Mangle large integral constants correctly

Testing has revealed that large integral constants (i.e. > INT64_MAX)
are always mangled as-if they are negative, even in places where it
would not make sense for them to be negative (like non-type template
parameters of type unsigned long long).

To address this, we change the way we model number mangling: always
mangle as-if our number is an int64_t. This should result in correct
results when we have large unsigned numbers.

N.B. Bizarrely, things that are 32-bit displacements like vbptr offsets
are mangled as-if they are unsigned 32-bit numbers. This is a pretty
egregious waste of space, it would be a 4x savings if we could mangle it
like a signed 32-bit number. Instead, we explicitly cast these
displacements to uint32_t and let the mangler proceed.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
8a5c9d7a4607a22170b6ddf3874321416c65fea5 26-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195669:
------------------------------------------------------------------------
r195669 | majnemer | 2013-11-25 09:50:19 -0800 (Mon, 25 Nov 2013) | 13 lines

[-cxx-abi microsoft] Create backrefs for <unnamed-type-`id'>

It wasn't possible for an anonymous type to show up inside of function arguments.
However, decltype (which MSVC added support for in 2010) makes this
possible. Further, backrefs to these anonymous types can now be formed.

This fixes PR18022.

N.B. We do not, and very likely _will not_, support MSVC's bug where
subsequent typedefs of anonymous types leak into the linkage name; this
is a gross violation of the ABI. A warning should be introduced to
inform our users of this particular shortcoming.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
7b0fe5d62cc31a61188a20b243794b800baa3e7e 20-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195168:
------------------------------------------------------------------------
r195168 | rnk | 2013-11-19 15:23:00 -0800 (Tue, 19 Nov 2013) | 17 lines

Add a mangler entry point for TBAA rather than using RTTI directly

Summary:
RTTI is not yet implemented for the Microsoft C++ ABI and isn't expected
soon. We could easily add the mangling, but the error is what prevents
us from silently miscompiling code that expects RTTI.

Instead, add a new mangleTypeName entry point that simply forwards to
mangleName or mangleType to produce a string that isn't part of the ABI.
Itanium can continue to use RTTI names to avoid unecessary test
breakage.

This also seems like the right design. The fact that TBAA names happen
to be RTTI names is now an implementation detail of the mangler, rather
than part of TBAA.

Differential Revision: http://llvm-reviews.chandlerc.com/D2153
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
93b717ac956f5c82f7895ed8874cbd514c6d0a4e 15-Nov-2013 Hans Wennborg <hans@hanshq.net> [-cxx-abi microsoft] Emit thunks for pointers to virtual member functions

Instead of storing the vtable offset directly in the function pointer and
doing a branch to check for virtualness at each call site, the MS ABI
generates a thunk for calling the function at a specific vtable offset,
and puts that in the function pointer.

This patch adds support for emitting such thunks. However, it doesn't support
pointers to virtual member functions that are variadic, have an incomplete
aggregate return type or parameter, or are overriding a function in a virtual
base class.

Differential Revision: http://llvm-reviews.chandlerc.com/D2104

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
58b6db76adab8dee2e64fbc300360f9b46c561ba 06-Nov-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix PR17738 - add support for vtordisp thunks when using -cxx-abi microsoft

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
bc6509175e1ce5cc1b48d1b97ac8d23d8b74167c 17-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Rename some functions for consistency.

Every other function in Redeclarable.h was using Decl instead of Declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
d6be277ba4bf271c6de8ffcc8c46f060c8cbd4d5 16-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> On 32 bit windows, mangle stdcall and fastcall decls in clang.

This removes the dependency on the llvm mangler doing it for us. In isolation,
the benefit is that the testing of what mangling is applied is all in one place:
(C, C++) X (Itanium, Microsoft) are all handled by clang.

This also gives me hope that in the future the llvm mangler (and llvm-ar) will
not depend on TargetMachine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
2cb17a06befb61b1434aaa991652fea4338c95d7 09-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Reland 192220 "Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft" with relaxed assertions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
0ac66c03c01ae95bc34cca71067ba8dd65e06a1d 08-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Revert 192220 as it fails on an assertion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c3dcfa20f8ec56fad90ffe42d0f4bc0168a2e138 08-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft

Reviewed at http://llvm-reviews.chandlerc.com/D1787

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
d1a32c328bce903fb1b17fc8147b646be818298e 08-Oct-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Fix the calling convention for operator new in records

Summary:
Operator new, new[], delete, and delete[] are all implicitly static when
declared inside a record. CXXMethodDecl already knows this, but we need
to account for that before we pick the calling convention for the
function type.

Fixes PR17371.

Reviewers: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1761

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
8a5fb999c6a9d3011f2c95543bad55021f8a01ca 04-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Simplify MicrosoftCXXNameMangler::mangleFunctionType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
11f22a35b7f08a8d017f6ab26e440edffc930f96 03-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Extract ABI-specific parts of MangleContext into separate classes

Reviewed at http://llvm-reviews.chandlerc.com/D1807

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
a53d7a0259ff88f78ba8ecac7d0cb3ea96302b1d 27-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> Abstract out the emission of vtables, add basic support for vtable emission when using -cxx-abi microsoft

Reviewed at http://llvm-reviews.chandlerc.com/D1532

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e3e686f5d16ac2a8a0da658935cd79ef3ada546d 26-Sep-2013 Reid Kleckner <reid@kleckner.net> Remove unused param from MicrosoftMangle::mangleCallingConvention()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
aa82461f696ced36b0cd817dfa492b6c93d15447 18-Sep-2013 David Majnemer <david.majnemer@gmail.com> Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately""

This reverts commit r190895 which reverted r190892.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
1f7fd68131872707a297335e6bc71beef47f9d73 18-Sep-2013 David Majnemer <david.majnemer@gmail.com> Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"

This reverts commit r190892.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
075404782734005e4742621ba4fa29e334cd4987 18-Sep-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle local TagDecls appropriately

Summary:
When selecting a mangling for an anonymous tag type:
- We should first try it's typedef'd name.
- If that doesn't work, we should mangle in the name of the declarator
that specified it as a declaration specifier.
- If that doesn't work, fall back to a static mangling of
<unnamed-type>.

This should make our anonymous type mangling compatible.

This partially fixes PR16994; we would need to have an implementation of
scope numbering to get it right (a separate issue).

Reviewers: rnk, rsmith, rjmccall, cdavis5x

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1540

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e9f6f33f0cf98a3e39025a57a0079cd316ed98f8 17-Sep-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Correctly identify Win32 entry points

Summary:
This fixes several issues with the original implementation:
- Win32 entry points cannot be in namespaces
- A Win32 entry point cannot be a function template, diagnose if we it.
- Win32 entry points cannot be overloaded.
- Win32 entry points implicitly return, similar to main.

Reviewers: rnk, rsmith, whunt, timurrrr

Reviewed By: rnk

CC: cfe-commits, nrieck

Differential Revision: http://llvm-reviews.chandlerc.com/D1683

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
978c5e0c239189117481b00fbba30101195f7e2c 13-Sep-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle user defined entry points properly

Summary:
Functions named "main", "wmain", "WinMain", "wWinMain", and "DllMain"
are never mangled regardless of linkage, even when compiling for kernel
mode.
Depends on D1655

Reviewers: timurrrr, pcc, rnk, whunt

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1670

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
cab7dad9eb1d986874a8224b6167f413aec55b14 13-Sep-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle declarations inside extern "C"

Summary:
This is a first step to getting extern "C" working properly inside
clang. There are a number of quirks but mangling declarations inside
such a function are a good first step.

Reviewers: timurrrr, pcc, cdavis5x

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1655

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
58e4cd09cc71893798282833806f4205b37dc828 11-Sep-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Canonicalize array parameters better

Summary:
More accurately characterize the nature of array parameters. Doing this
removes false back-reference opportunities. Remove some hacks now that
we characterize these better.

Reviewers: rnk, timurrrr, whunt, cdavis5x

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1626

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c5c6fa78fd0e6a15c5611e8a059359054cfbf9d5 10-Sep-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Mangle dynamic initializer stubs the same way MSVC does

Summary: Dynamic initializers are mangled as ??__E <name> YAXXZ.

Reviewers: timurrrr

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1477

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
942f9fe11d3a9583eef6bc4ca2549b1f0d1694da 10-Sep-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement guard variables for static initialization

Static locals requiring initialization are not thread safe on Windows.
Unfortunately, it's possible to create static locals that are actually
externally visible with inline functions and templates. As a result, we
have to implement an initialization guard scheme that is compatible with
TUs built by MSVC, which makes thread safety prohibitively difficult.

MSVC's scheme is that every function that requires a guard gets an i32
bitfield. Each static local is assigned a bit that indicates if it has
been initialized, up to 32 bits, at which point a new bitfield is
created. MSVC rejects inline functions with more than 32 static locals,
and the externally visible mangling (?_B) only allows for one guard
variable per function.

On Eli's recommendation, I used MangleNumberingContext to track which
bit each static corresponds to.

Implements PR16888.

Reviewers: rjmccall, eli.friedman

Differential Revision: http://llvm-reviews.chandlerc.com/D1416

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e8519c31a6ef853b627d557702ac1890f18ce2c9 30-Aug-2013 Charles Davis <cdavis5x@gmail.com> Add ms_abi and sysv_abi attribute handling.

Based on a patch by Benno Rice!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
ef072033876e295ec5d3402f8730a3ae358ad815 28-Aug-2013 Reid Kleckner <reid@kleckner.net> Delete CC_Default and use the target default CC everywhere

Summary:
Makes functions with implicit calling convention compatible with
function types with a matching explicit calling convention. This fixes
things like calls to qsort(), which has an explicit __cdecl attribute on
the comparator in Windows headers.

Clang will now infer the calling convention from the declarator. There
are two cases when the CC must be adjusted during redeclaration:
1. When defining a non-inline static method.
2. When redeclaring a function with an implicit or mismatched
convention.

Fixes PR13457, and allows clang to compile CommandLine.cpp for the
Microsoft C++ ABI.

Excellent test cases provided by Alexander Zinenko!

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D1231

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
309f6456626fdc85181fd42d9ed8d9c0c5a6746a 27-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Remove ArgIndex, we handle all template argument kinds!

TemplateExpansion cannot happen here because MSVC doesn't mangle
anything but the fully substituted template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
4b104067143cd97e954d279ddc42ed03bbe86a08 26-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix virtual destructor mangling when using "-cxx-abi microsoft" on x64

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
ec0258a0a89ae39bfb6c5962ee1b8310481bc00f 26-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Unnamed types are mangled less wrong


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
360d23ef628bf891514e77c519d1d77305ca1743 16-Aug-2013 David Majnemer <david.majnemer@gmail.com> Parse: Do not 'HandleTopLevelDecl' on templated functions.

Summary:
HandleTopLevelDecl on a templated function leads us to try and mangle
it.

Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1412

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
1c7a4094aff42e3bcfe948527e71f8fedbbf3222 15-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle member pointers better

Summary:
There were several things going wrong:
- We mangled in useless qualifiers like "volatile void" return types.
- We didn't propagate 64-bit pointer markers sufficiently.
- We mangled qualifiers belonging to the pointee incorrectly.

This fixes PR16844 and PR16848.

Reviewers: rnk, whunt

Reviewed By: rnk

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1353

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
26314e1a3e37efff2d19212d262731bc3a3044c4 13-Aug-2013 David Majnemer <david.majnemer@gmail.com> Fix typo in comment.

Thanks Kim Gräsman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c80eb46a0f37bee9597f1b466013a0f6271f9318 13-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle __uuidof correctly into template parameters

Summary:
It seems that __uuidof introduces a global extern "C" declaration of
type __s_GUID. However, our implementation of __uuidof does not provide
such a declaration and thus must open-code the mangling for __uuidof in
template parameters.

This allows us to codegen scoped COM pointers and other such things.

This fixes PR16836.
Depends on D1356.

Reviewers: rnk, cdavis5x, rsmith

Reviewed By: rnk

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1357

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
f2081f685a021d1a50ded55cb23c7f039a037e7c 13-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle TemplateArgument::Declaration for references

Summary:
Properly mangle declarations showing up in template arguments that are
reference parameters. Fun-fact: undname cannot handle these!

Reviewers: rnk, cdavis5x

Reviewed By: rnk

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1356

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
17ffbd03695a590d1c513010b7d4e96b9d5fe7d9 09-Aug-2013 David Majnemer <david.majnemer@gmail.com> Revert "[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section"

This commit reverts r188053.

It is breaking the build bots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
ea3db97495b4a657bff505cd06b71e53ced46805 09-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section

We mangled them like:
L___uuid_12345678-1234-1234-1234-123456789abc

We should've mangled them like:
__GUID_12345678_1234_1234_1234_123456789abc

Furthermore, they are external symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c0e64f3d293bc1c448a84d285f115bc946b91b07 06-Aug-2013 David Majnemer <david.majnemer@gmail.com> [ms-cxxabi] Properly mangle member pointers

There were three things missing from the original implementation:

- We would omit the 'E' qualifier for members int 64-bit mode.
- We would not exmaine the qualifiers in 'IsMember' mode.
- We didn't generate the correct backref to the base class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
02c44f0962c8739c447bc35688d47294f72494aa 06-Aug-2013 David Majnemer <david.majnemer@gmail.com> [ms-cxxabi] Handle template-template arguments

Template-template arguments appear to be a rather simple encoding of the
template's templated tag type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
7802fc9e6cb488fc1321ce3f7431b7aeeefdd18f 05-Aug-2013 David Majnemer <david.majnemer@gmail.com> [ms-cxxabi] Mangle nullptr template arguments

MSVC mangles nullptr template arguments identically to zero literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
635de28950ef84ae26308ff734e778bad1ddde92 30-Jul-2013 Timur Iskhodzhanov <timurrrr@google.com> Add MicrosoftVFTableContext to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
a4130baad9d10b7feabb7e003da53424e986d269 22-Jul-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Emit linkonce complete dtors in TUs that need them

Based on Peter Collingbourne's destructor patches.

Prior to this change, clang was considering ?1 to be the complete
destructor and the base destructor, which was wrong. This lead to
crashes when clang tried to emit two LLVM functions with the same name.

In this ABI, TUs with non-inline dtors might not emit a complete
destructor. They are emitted as inline thunks in TUs that need them,
and they always delegate to the base dtors of the complete class and its
virtual bases. This change uses the DeferredDecls machinery to emit
complete dtors as needed.

Currently in clang try body destructors can catch exceptions thrown by
virtual base destructors. In the Microsoft C++ ABI, clang may not have
the destructor definition, in which case clang won't wrap the virtual
virtual base destructor calls in a try-catch. Diagnosing this in user
code is TODO.

Finally, for classes that don't use virtual inheritance, MSVC always
calls the base destructor (?1) directly. This is a useful code size
optimization that avoids emitting lots of extra thunks or aliases.
Implementing it also means our existing tests continue to pass, and is
consistent with MSVC's output.

We can do the same for Itanium by tweaking GetAddrOfCXXDestructor, but
it will require further testing.

Reviewers: rjmccall

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1066

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
3be37d1d2d5733523e516e5a6b22c576e740230e 13-Jul-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Don't consider function templates for name backrefs

They don't seem to be used for back references, presumably because a
function template is unlikely to reoccur, while a class template name
may reoccur as a type.

This fixes a mangling issue for llvm::hash_combine() in Hashing.h.

Reviewers: timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D1078

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e5798893b1fb2468a11e8374d340e6fa2f82a9a5 10-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Get rid of dead/useless code for block mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
5d90d1805c99e0f14c623adf2cbedc725184bc4b 02-Jul-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Mangle variadic template parameter packs

Unlike Itanium, there is no code to indicate the beginning of a
parameter pack. I tested this with MSVC 2013, which is the only version
that implements variadic templates so far.

This is needed to compile APInt.cpp for the MS C++ ABI.

Reviewers: timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D1077

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
f21818dbeeb024ecf4c221ef08735f7c99a7acea 24-Jun-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Use sugared types in the mangler instead of canonical types

At this point, it's clear that the MSVC mangler uses the type-as-written
instead of the canonical type, so this should bring us closer to MSVC.
The main thrust of this change is to fix the way we mangle decayed array
parameters of function pointer parameters. With a DecayedType sugar
node, this code can now be much simpler.

Fixes PR16096.

This also fixes a separate issue that Richard spotted in review.
Because separate declarations of the same entity can be spelled and
mangled differently, MSVC always mangles the earliest declaration in an
attempt to avoid link errors. Clang now does the same.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D844

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
9063302a82423cb83f002257a416741850739a70 19-Jun-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Emit and install appropriately mangled vbtables

In Itanium, dynamic classes have one vtable with several different
address points for dynamic base classes that can't share vtables.

In the MS C++ ABI, each vbtable that can't be shared gets its own
symbol, similar to how ctor vtables work in Itanium. However, instead
of mangling the subobject offset into the symbol, the unique portions of
the inheritance path are mangled into the symbol to make it unique.

This patch implements the MSVC 2012 scheme for forming unique vbtable
symbol names. MSVC 2010 use the same mangling with a different subset
of the path. Implementing that mangling and possibly others is TODO.

Each vbtable is an array of i32 offsets from the vbptr that points to it
to another virtual base subobject. The first entry of a vbtable always
points to the base of the current subobject, implying that it is the
same no matter which parent class contains it.

Reviewers: rjmccall

Differential Revision: http://llvm-reviews.chandlerc.com/D636

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
5fc764aaff9c0f714931c4d7ba0c5d8ce6790387 22-May-2013 Reid Kleckner <reid@kleckner.net> Remove unused #include <map>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
f0219cdcc6af557676f23c2c8d1f922caaf6f49a 22-May-2013 Reid Kleckner <reid@kleckner.net> Use StringMap in MicrosoftMangle to resolve FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e7e94c907cf6924929e81083e93628d0f520c734 14-May-2013 David Blaikie <dblaikie@gmail.com> Fix clang -Werror build due to -Wreorder violation introduced in r181825

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
d6a08d16a0c8d98e2491f3ee012dbb46b64038f2 14-May-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Mangle in an implicit 'E' for certain types on win64

Most of the complexity of this patch is figuring out which types get the
qualifier and which don't. If we implement __ptr32/64, then we should
check the qualifier instead of assuming all pointers are 64-bit.

This fixes PR13792.

Patch by Warren Hunt!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181825 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
181e3ecc0907ae0103586a9f4db52241995a8267 13-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Cleanup handling of UniqueExternalLinkage.

This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.

Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.

Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
524387ae3dfc0c4cf2b095f83f9e47aa549b7e55 09-May-2013 Ben Langmuir <ben.langmuir@intel.com> CodeGen for CapturedStmts

EmitCapturedStmt creates a captured struct containing all of the captured
variables, and then emits a call to the outlined function. This is similar in
principle to EmitBlockLiteral.

GenerateCapturedFunction actually produces the outlined function. It is based
on GenerateBlockFunction, but is much simpler. The function type is determined
by the parameters that are in the CapturedDecl.

Some changes have been added to this patch that were reviewed as part of the
serialization patch and moving the parameters to the captured decl.

Differential Revision: http://llvm-reviews.chandlerc.com/D640


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
b70d1c32ca62d072b3f4a5d4628fdcf692cbf2f0 25-Apr-2013 Peter Collingbourne <peter@pcc.me.uk> [ms-cxxabi] Fix a number of bugs in the mangler.

This includes the following fixes:
- Implement 4 subtly different variants of qualifier mangling and use them
in what I believe are the right places.
- Fix handling of array types. Previously we were always decaying them,
which is wrong if the type appears as a template argument, pointee,
referent etc.
Fixes PR13182.

Differential Revision: http://llvm-reviews.chandlerc.com/D709

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
cb5949d1cd6ed8f5e830dd1849a2b786e32e1818 09-Apr-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Add "$$C" when mangling template arg QualTypes

Credit goes to Timur Iskhodzhanov for finding the problem and solution.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
1232e279b4a0d98885b9672d3bb5905488360e49 26-Mar-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Mangle vector types

Summary:
The only vector types a user can pass from MSVC code to clang code are
the ones from *mmintrin.h, so we only have to match the MSVC mangling
for these types. MSVC mangles the __m128 family of types as tag types,
which we match. For other vector types, we emit a unique tag type
mangling that won't match anything produced by MSVC.

Reviewers: rjmccall

CC: chandlerc, timurrrr, cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D576

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
ff430f6af32468d3b09b66266aef03818230c35f 20-Mar-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Mangle function pointer template arguments correctly

Reviewers: rjmccall

CC: timurrrr, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D554

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
f16216c7bb6ec4fd4a1ee4ed801fe7c01267be71 20-Mar-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Fix assertion on unhandled function template arg types

This code was changed in r158376 to get template argument source info
for better diagnostics, but the current code asserts for any kind of
unsupported template argument before it can issue a diagnostic. This change
goes back to the Itanium implementation of isTemplate() and puts the argument
index into the diagnostic instead of a source location.

Review URL: http://llvm-reviews.chandlerc.com/D553

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
1d4fff5551c2347010b955b4337a2aa7d65a050e 27-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> Better support for constructors with -cxx-abi microsoft, partly fixes PR12784

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
39e6ab4be93d9c5e729a578ddd9d415cd2d49872 18-Feb-2013 David Blaikie <dblaikie@gmail.com> Replace TypeLoc llvm::cast support to be well-defined.

The TypeLoc hierarchy used the llvm::cast machinery to perform undefined
behavior by casting pointers/references to TypeLoc objects to derived types
and then using the derived copy constructors (or even returning pointers to
derived types that actually point to the original TypeLoc object).

Some context is in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html
Though it's spread over a few months which can be hard to read in the mail
archive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
59660c21178b6af518bd4b564e032d5c9cc218cb 13-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
21f18c4fda167dc5f72feddbd6a7ac1b63200a0d 07-Feb-2013 Guy Benyei <guy.benyei@intel.com> Add OpenCL samplers as Clang builtin types and check sampler related restrictions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b 20-Jan-2013 Guy Benyei <guy.benyei@intel.com> Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
b13621d08e20ac7aa550e05896de8a57ee99c1e8 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Re-commit r170428 changes with Linux style file endings.

Add OpenCL images as clang builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
7f92f2d8d9b7a07900c030183bc13a9ff60057cc 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Revert changes from r170428, as I accidentally changed the line endings of these files to Windows style.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
736104a7619c53ef92553780273d7357a3cdde81 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Add OpenCL images as clang builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.

Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
53c61c5c0c912b5032882471f5215d66a11bb0ce 29-Nov-2012 Timur Iskhodzhanov <timurrrr@google.com> [-cxx-abi microsoft] Also spill the argument-back-references context when mangling templates

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
79b7cc59658ca477cd943561d2d30cdfe9e09a5a 26-Nov-2012 Timur Iskhodzhanov <timurrrr@google.com> Fix PR14413 - incorrect mangling of anonymous namespaces with -cxx-abi microsoft

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
0bbf1c668e8cb1a3e5b1385c2fd5cd6c73f481c0 16-Nov-2012 Matt Beaumont-Gay <matthewbg@google.com> Fix PR14321, a crash when Clang is built with GCC 4.7 at -O1 or greater.

GCC 4.7 reuses stack slots fairly aggressively, which exposes more temporary
lifetime bugs.

No new test, this was caught by the existing CodeGenCXX/mangle-ms-templates.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
0a26d7680d064653cb42e89e70c62402283003fd 13-Nov-2012 Nico Weber <nicolasweber@gmx.de> [ms] Make mangleIntegerLiteral less aware of exact type of the literal.

Integer literal mangling does not actually depend on exact type of the literal.
This will simplify calling mangleIntegerLiteral when literal type is not known,
for example, when sizes or offsets are mangled as integer literals.

Also, call mangleNumber instead of directly printing mangled values of 0/1, to
avoid this knowledge from being in multiple places.

Patch from Evgeny Eltsin!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c8e78b2c8e4d56ef05880437326806dd0a2aa45a 09-Nov-2012 Nico Weber <nicolasweber@gmx.de> [ms] Implement int64_t version of mangleNumber() in terms of the APSInt version.

No intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e95b46bf50059806d58f494f6ad3a827dce02e24 09-Nov-2012 Nico Weber <nicolasweber@gmx.de> [Windows] Fix mangling of number literal '0'

Do this by making the mangleNumber(APSInt) overload look like
the int64_t version. (The latter should probably just delegate
to the former).

Test from Evgeny Eltsin!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
02c23ebf41ae2f70da0ba7337e05c51fbfe35f7f 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Make DiagnosticOptions intrusively reference-counted, and make sure
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
385b91f2f49169442067ff6406b370618d11a776 03-Oct-2012 Nico Weber <nicolasweber@gmx.de> When mangling an APSInt with the ms abi, make sure to look at all nibbles.

Currently, it's ignored if the number of set bits isn't divisible by 4.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c950bc92e69910b667d7a3dea24e4afc8abdc7e5 03-Oct-2012 Nico Weber <nicolasweber@gmx.de> While I'm here, resync a %select with the enum definition it selects on.

* nullptr used to be mapped to ERROR, now mapped to nullptr
* integral was missing
* expressions now have their own error message, so they won't reach
this. Map them to ERROR.

Note that clang usually crashes before emitting this diagnostic anyway
(see PR13984), so this change alone doesn't have an observable effect.
It makes the code more correct though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
2225556de7186e9b22cd4da4e7d1f5c26daae8da 03-Oct-2012 Nico Weber <nicolasweber@gmx.de> Move expression mangling in the microsoft mangler to its own function.

This matches what's done in ItaniumMangle and makes it a bit easier
to implement mangling for more expressions. Also use the slightly nicer
"not yet implemented" error message from there.

No functionality change (except for the different error message).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
88a374ad85eec5a47bd172aa7b765d24fdf01690 03-Oct-2012 Nico Weber <nicolasweber@gmx.de> Replace a default: with an explicit list of cases. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
a04ca5c4e091f567230fc95c6b2715576ad0893b 03-Sep-2012 Timur Iskhodzhanov <timurrrr@google.com> Fix PR13444 - wrong mangling of "const char * const *" and friends with "-cxx-abi microsoft"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
17d35c36fbae764fcd68fa8b31624078a033aabc 01-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Normalize line endings of r163013 (part 2).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
6666ed4ed2e2bc13da5ac5d0a4947019137d45be 31-Aug-2012 Joao Matos <ripzonetriton@gmail.com> Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
efe97d67399a3fd616dd249743d1f848d6ad6636 27-Aug-2012 John McCall <rjmccall@apple.com> Use cast<> instead of static_cast. Patch by Timur Iskhodzhanov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
2612e9f1d0a356a303097bea9faf53fdb213c50c 25-Aug-2012 John McCall <rjmccall@apple.com> Fix the mangling of function pointers in the MS ABI.
Patch by Timur Iskhodzhanov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
bae11d8f82378f3b5ffcc994d8b107c9fbec6c4e 26-Jul-2012 Timur Iskhodzhanov <timurrrr@google.com> Remove an outdated comment; add one test to compare function pointer and block mangling

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
dc6dabcabd36d61d1ad7f5069080b2aade79b1f0 26-Jul-2012 Timur Iskhodzhanov <timurrrr@google.com> Fix PR13389 (Wrong mangling of return type qualifiers with -cxx-abi microsoft)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
d93c5ff2b1a83f73c64ee6b8e4eff521865e92d2 25-Jul-2012 Timur Iskhodzhanov <timurrrr@google.com> Add a FIXME to revisit the performance of BackRefMap later

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
f5e0b225b4d8027edab993ad4ac87510fcd6f991 24-Jul-2012 Timur Iskhodzhanov <timurrrr@google.com> Fix PR13207 (Mangling of templates with back references when using -cxx-abi microsoft)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
8f88a1dcc57cfe8580eb1558a783ad8499bfe8e0 12-Jul-2012 Timur Iskhodzhanov <timurrrr@google.com> [Windows] Use thiscall as the default calling convention for class methods. PR12785

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
4285f84a5c3725210b4f12551af6c5d467d0763d 27-Jun-2012 Timur Iskhodzhanov <timurrrr@google.com> [Windows] Improve mangling of templates when back references are present

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
3f835687b8f7ad3060fe4c462727b212ed714b30 23-Jun-2012 Timur Iskhodzhanov <timurrrr@google.com> [Windows] Fix mangling of repeated types in the presence of bool and function pointers PR13176,PR13177

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
3facb626608c99f497cb5b8bfc60d3ed3ba304b6 23-Jun-2012 Charles Davis <cdavis@mines.edu> MicrosoftMangle: Fix mangling of integral constant non-type template arguments in a class specialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
06e767d6703fdae9cda21c6c96c79a0135e2567a 21-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> MS: Mangle rvalue references and nullptr_t, and produce back-references when
appropriate. Patch by João Matos!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
28e862a4fbb9ed4060d1db25d45b1ed7a42f1b75 13-Jun-2012 Kaelyn Uhrain <rikka@google.com> Remove the trailing backslash from the comment to remove the warning about
a multi-line comment, fixing builds with e.g. -Werror=comment enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e0deb035b3e2d07b41ea55db84b110abcb65b753 13-Jun-2012 Charles Davis <cdavis@mines.edu> Grab bag of Microsoft Mangler fixes:

- Support mangling virtual function tables (base tables need work on the
ManglerContext interface).
- Correct mangling of local scopes (i.e. functions and C++ methods).
- Replace every llvm_unreachable() for actually-reachable code with a
diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c0838d2acb498b0491908d3693514dfec5befe6f 08-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13047: Fix various abuses of clang::Type in the MS mangler, to make it work
in the presence of type sugar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
855243789cb44799c03f4c7216d3d6308805f549 07-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Plug a long standing memory leak in TemplateArgument.

The integral APSInt value is now stored in a decomposed form and the backing
store for large values is allocated via the ASTContext. This way its not
leaked as TemplateArguments are never destructed when they are allocated in
the ASTContext. Since the integral data is immutable it is now shared between
instances, making copying TemplateArguments a trivial operation.

Currently getting the integral data out of a TemplateArgument requires creating
a new APSInt object. This is cheap when the value is small but can be expensive
if it's not. If this turns out to be an issue a more efficient accessor could
be added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
bd1d18ecc420838b7ba620c0a2c5d2a86cac371d 05-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13022: cope with parenthesized function types in MS name mangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c4d7675ddd598e3d89237cd04eeba3be322e560c 29-May-2012 Charles Davis <cdavis@mines.edu> Use fewer temporaries mangling APSInt objects. The performance difference
is negligible, but it makes the code clearer. Based on a suggestion by
Jordy Rose.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c1fd52b4b08384697428206a758125cb4a62d83f 28-May-2012 Charles Davis <cdavis@mines.edu> Fix mangling of integral template arguments between 1 and 10. Add a test case
for this. Reported by Timur Iskhodzhanov.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
104e51f30fdf42b1f594a1be20de1c8673088c50 28-May-2012 Charles Davis <cdavis@mines.edu> Fix Lang's fix. This should fix the tests for +Asserts builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
f17523b6d3d9ef1dbcb64b63d9bada7bdae194a7 27-May-2012 Lang Hames <lhames@gmail.com> Fix call to APSInt constructor - it doesn't take an initial value, just a
bitwidth and signedness. Also rename the variable to reflect its purpose.

No test case - discovered during random code exploration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
9fd2359ee3b140557b808e4b79bc73a3b9d62304 27-May-2012 Charles Davis <cdavis@mines.edu> Mangle template instantiations properly (as of VC 7.x) when compiling for
the Microsoft Visual C++ ABI. Currently limited to type and integral
non-type arguments. Based on a patch by Timur Iskhodzhanov!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
3a8ac07956ac63bd202cdd3b9e4a2c6cefa888da 01-May-2012 John McCall <rjmccall@apple.com> When mangling a synthetic function declaration, we might not have
type-source information for its parameters. Don't crash when
mangling them in the MS C++ ABI. Patch by Timur Iskhodzhanov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
50118da99d3c04eb14747cfdc44a9e1d56432aea 01-Dec-2011 Michael J. Spencer <bigcheesegs@gmail.com> Add Microsoft mangling of constructors and destructors. Patch by Dmitry!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
e0a22d06888c13989b3f72db319f1d498bf69153 18-Oct-2011 John McCall <rjmccall@apple.com> Macro metaprogramming for builtin types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
0ddaeb9b031070ec64afe92d9892875ac44df427 17-Oct-2011 John McCall <rjmccall@apple.com> Add a new placeholder type to represent "unbridged"
casts in ARC.

No semantic analysis yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
aa4a99b4a62615db243f7a5c433169f2fc704420 15-Oct-2011 Anton Korobeynikov <asl@math.spbu.ru> Provide half floating point support as a storage only type.
Lack of half FP was a regression compared to llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
b001de7458d17c17e6d8b8034c7cfcefd3b70c00 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.

Thanks to Jeffrey Yasskin for the thorough review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
ca63c200346c0ca9e00194ec6e34a5a7b0ed9321 25-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a new type node, UnaryTransformType, designed to represent a
type that turns one type into another. This is used as the basis to
implement __underlying_type properly - with TypeSourceInfo and proper
behavior in the face of templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
31bebe03336cbaafb76c6f40642fa47f2cc6c479 29-Apr-2011 Charles Davis <cdavis@mines.edu> Remove comments about __int8 and friends from the mangler. Turns out we don't
actually have to implement them, since in modern versions of MSVC they're
aliases to the standard C types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
864c041e118155c2b1ce0ba36942a3da5a4a055e 26-Apr-2011 John McCall <rjmccall@apple.com> Make yet another placeholder type, this one marking that an expression is a bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function. Diagnose this in the general case. Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
162e1c1b487352434552147967c3dd296ebee2f7 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Support for C++11 (non-template) alias declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
414d8967e1d760ea1e19a4aca96b13777a8cf8c5 14-Apr-2011 Anton Korobeynikov <asl@math.spbu.ru> Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or
AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86.

In particular, all library functions should always be AAPCS regardless of floating point ABI used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 07-Apr-2011 John McCall <rjmccall@apple.com> Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
9c6082fe89c61af697f017aa80937581cc2128d8 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Revert "Add CC_Win64ThisCall and set it in the necessary places."

This reverts commit 126863.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
88d117c2eedd7c5bec57ac983a98d5e12bdd2cc6 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Add CC_Win64ThisCall and set it in the necessary places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
34b41d939a1328f484511c6002ba2456db879a29 20-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement the C++0x deduced 'auto' feature.

This fixes PR 8738, 9060 and 9132.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
f0be979bddb8baa28e77693a3dc931e487b2a9f2 11-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> For consistency, use llvm::raw_ostream in the rest of the mangle api.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
0e376a0ca8372c9e809d08a9db2fae98394878b8 11-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Use raw_ostream instead of raw_svector_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c4850c2aa4c281a352e228aafc51fb1e30dcad02 11-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Use raw_svector_ostream in more places in the mangler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
f4c7371fb1d3cebcfb40abad4537bb82515704ea 19-Jan-2011 John McCall <rjmccall@apple.com> Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
c3069d618f4661d923cb1b5c4525b082fce73b04 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Start implementing support for substitution into pack expansions that
involve template parameter packs at multiple template levels that
occur within the signatures members of class templates (and partial
specializations thereof). This is a work-in-progress that is deficient
in several ways, notably:
- It only works for template type parameter packs, but we need to
also support non-type template parameter packs and template template
parameter packs.
- It doesn't keep track of the lengths of the substituted argument
packs in the expansion, so it can't properly diagnose length
mismatches.

However, this is a concrete step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp
14110477887e3dc168ffc6c191e72d705051f99e 13-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Move name mangling support from CodeGen to AST. In the
process, perform a number of refactorings:

- Move MiscNameMangler member functions to MangleContext
- Remove GlobalDecl dependency from MangleContext
- Make MangleContext abstract and move Itanium/Microsoft functionality
to their own classes/files
- Implement ASTContext::createMangleContext and have CodeGen use it

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/MicrosoftMangle.cpp