summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle-ms-templates.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [MS] Don't escape MS C++ names with \01Reid Kleckner2018-03-161-78/+78
| | | | | | | It is not needed after LLVM r327734. Now it will be easier to copy-paste IR symbol names from Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327738 91177308-0d34-0410-b5e6-96231b3b80d8
* MS ABI: Fix mangling of unsigned int template paramsWill Wilson2014-12-111-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223999 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix mangling of __uuidof after two levels of template instantiationReid Kleckner2014-06-101-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210570 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-2/+2
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199250 91177308-0d34-0410-b5e6-96231b3b80d8
* [-cxx-abi microsoft] Mangle large integral constants correctlyDavid Majnemer2013-12-091-0/+38
| | | | | | | | | | | | | | | | | | | | 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/trunk@196771 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse: Do not 'HandleTopLevelDecl' on templated functions.David Majnemer2013-08-161-2/+11
| | | | | | | | | | | | | | | | 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
* [-cxx-abi microsoft] Mangle __uuidof correctly into template parametersDavid Majnemer2013-08-131-2/+16
| | | | | | | | | | | | | | | | | | | | | | | 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
* [-cxx-abi microsoft] Mangle TemplateArgument::Declaration for referencesDavid Majnemer2013-08-131-0/+11
| | | | | | | | | | | | | | | | 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
* [ms-cxxabi] Handle template-template argumentsDavid Majnemer2013-08-051-0/+29
| | | | | | | | 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
* [ms-cxxabi] Mangle nullptr template argumentsDavid Majnemer2013-08-051-2/+7
| | | | | | | 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
* [ms-cxxabi] Mangle variadic template parameter packsReid Kleckner2013-07-021-0/+23
| | | | | | | | | | | | | | 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
* [ms-cxxabi] Mangle in an implicit 'E' for certain types on win64Reid Kleckner2013-05-141-1/+25
| | | | | | | | | | | | 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
* [ms-cxxabi] Fix a number of bugs in the mangler.Peter Collingbourne2013-04-251-13/+19
| | | | | | | | | | | | | | 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
* [ms-cxxabi] Add "$$C" when mangling template arg QualTypesReid Kleckner2013-04-091-0/+12
| | | | | | 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
* [ms-cxxabi] Mangle function pointer template arguments correctlyReid Kleckner2013-03-201-0/+13
| | | | | | | | | | 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
* [Windows] Fix mangling of number literal '0'Nico Weber2012-11-081-0/+3
| | | | | | | | | | | | 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
* When mangling an APSInt with the ms abi, make sure to look at all nibbles.Nico Weber2012-10-031-0/+9
| | | | | | | | 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
* MicrosoftMangle: Fix mangling of integral constant non-type template ↵Charles Davis2012-06-231-0/+10
| | | | | | arguments in a class specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159056 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix mangling of integral template arguments between 1 and 10. Add a test caseCharles Davis2012-05-281-0/+3
| | | | | | | for this. Reported by Timur Iskhodzhanov. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157583 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for 157547. Before that patch, all the digits would be mangledCharles Davis2012-05-281-0/+12
| | | | | | | as zeroes. Now the digits are properly non-zero. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157552 91177308-0d34-0410-b5e6-96231b3b80d8
* Mangle template instantiations properly (as of VC 7.x) when compiling forCharles Davis2012-05-261-0/+43
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