llvm-project/clang/lib
David Majnemer 048f90cc04 [-cxx-abi microsoft] Properly mangle enums
While testing our ability to mangle large constants (PR18175), I
incidentally discovered that we did not properly mangle enums correctly.

Previously, we would append the width of the enum in bytes after the
type-tag differentiator.

This would mean "enum : short" would be mangled as 'W2' while "enum :
char" would be mangled as 'W1'.  Upon testing this with several versions
of MSVC, I found that this did not match their behavior: they always use
'W4'.

N.B.  Quick testing uncovered that undname allows different numbers to
follow the 'W' in the following way:

'W0' -> "enum char"
'W1' -> "enum unsigned char"
'W2' -> "enum short"
'W3' -> "enum unsigned short"
'W4' -> "enum"
'W5' -> "enum unsigned int"
'W6' -> "enum long"
'W7' -> "enum unsigned long"

However this scheme appears abandoned, I cannot get MSVC to trigger it.
Furthermore, it's incomplete: it doesn't handle "bool" or "long long".

llvm-svn: 196752
2013-12-09 04:28:34 +00:00
..
ARCMigrate Fix a tranche of comment, test and doc typos 2013-12-05 16:25:25 +00:00
AST [-cxx-abi microsoft] Properly mangle enums 2013-12-09 04:28:34 +00:00
ASTMatchers Another pass at adding missing matchers into the registry. 2013-11-25 15:03:44 +00:00
Analysis Revert "[analyzer] Refactor conditional expression evaluating code" 2013-12-06 18:56:29 +00:00
Basic ARM: teach Sema that "r" can match 64-bit values 2013-12-08 15:24:55 +00:00
CodeGen [AArch64]Add missing pair intrinsics such as: 2013-12-09 03:52:22 +00:00
Driver Extend assembler handling for NetBSD/MIPS to pass down the correct ABI, 2013-12-08 13:54:58 +00:00
Edit ObjectiveC migrator: When doing migration, migrator must suggest 2013-10-01 21:16:29 +00:00
Format clang-format: Change line break decisions for array subscripts. 2013-12-06 15:19:50 +00:00
Frontend Fix a tranche of comment, test and doc typos 2013-12-05 16:25:25 +00:00
FrontendTool Bring back a StringRef used in some build configurations 2013-11-27 19:44:04 +00:00
Headers Fix a SSE2 intrinsics typo 2013-11-23 22:11:57 +00:00
Index libclang does not depend directly on clangFormat; but clangIndex does 2013-11-13 22:26:04 +00:00
Lex Changed ConditionValue argument to PPCallbacks If and Elif callbacks to be a 3-state enum. 2013-12-07 08:41:15 +00:00
Parse Fix code typos spotted while working on type traits 2013-12-06 17:56:43 +00:00
Rewrite Check the initial line number without going through PresumedLoc 2013-12-05 17:28:42 +00:00
Sema Rename a variable that I missed in the previous refactoring. 2013-12-09 00:15:23 +00:00
Serialization Fix code typos spotted while working on type traits 2013-12-06 17:56:43 +00:00
StaticAnalyzer Revert "[analyzer] Refactor conditional expression evaluating code" 2013-12-06 18:56:29 +00:00
Tooling Fixed a bad assert from r194968. r194969 removed the assert. 2013-12-05 04:27:16 +00:00
CMakeLists.txt Fix dependencies now that the ARC migrator depends on the static analyzer. 2013-08-22 15:50:02 +00:00
Makefile Fix dependencies now that the ARC migrator depends on the static analyzer. 2013-08-22 15:50:02 +00:00