summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-ms-cxx14.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-land "MS ABI: lambda call operators are instance methods and should use ↵Reid Kleckner2015-04-011-5/+5
| | | | | | | | | | | | | thiscall" Update the test cases to pass when lambda call operators use thiscall. Update the lambda-to-block conversion operator to use the default free function calling convention instead of the call operator's convention. This reverts commit r233082 and re-instates r233023. llvm-svn: 233835
* Reverting r233023 -- it caused test failures on Windows with MSVC x86.Aaron Ballman2015-03-241-5/+5
| | | | | | http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/572 llvm-svn: 233082
* MS ABI: lambda call operators are instance methods and should use thiscallReid Kleckner2015-03-231-5/+5
| | | | | | Fixes an issue reported by Daniel Berenyi on cfe-dev. llvm-svn: 233023
* MS ABI: Implement the MSVC 2015 scheme for scope disambiguationDavid Majnemer2015-03-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | consider C++ that looks like: inline int &f(bool b) { if (b) { static int i; return i; } static int i; return i; } Both 'i' variables must have distinct (and stable) names for linkage purposes. The MSVC 2013 ABI would number the variables using a count of the number of scopes that have been created. However, the final 'i' returns to a scope that has already been created leading to a mangling collision. MSVC 2015 fixes this by giving the second 'i' the name it would have if it were declared before the 'if'. However, this results in ABI breakage because the mangled name, in cases where there was no ambiguity, would now be different. We implement the new behavior and only enable it if we are targeting the MSVC 2015 ABI, otherwise the old behavior will be used. This fixes PR18131. llvm-svn: 232766
* MS ABI: Use '1' (instead of '0') relative scope discriminatorsDavid Majnemer2014-10-051-2/+2
| | | | | | | | This changes the scope discriminator's behavior to start at '1' instead of '0'. Symbol table diffing, for ABI compatibility testing, kept finding these as false positives. llvm-svn: 219075
* MS ABI: Support mangling of return-types deducing to local typesDavid Majnemer2014-04-011-0/+32
| | | | | | | | | | | | | | | | | | The MS ABI forces us into catch-22 when it comes to functions which return types which are local: - A function is mangled with it's return type. - A type is mangled with it's surrounding context. Avoid this by mangling auto and decltype(autp) directly into the function's return type. Using this mangling has the double advantage of being compatible with the C++ standard without crashing the compiler. N.B. For the curious, the MSVC mangling leads to collisions amongst template functions and either crashes when faced with local types or is otherwise incapable of returning them. llvm-svn: 205282
* MS ABI: Mangle variable templates properlyDavid Majnemer2014-03-041-0/+8
We wouldn't recognize variable templates as being templates leading us to leave the template arguments off of the mangled name. This would allow two unrelated templates to map to the same mangled name. N.B. While MSVC doesn't support variable templates as of this date, this mangling is the most likely thing they will choose to use. Their demangler can successfully demangle our manglings with the template arguments shown. llvm-svn: 202789
OpenPOWER on IntegriCloud