diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-03-30 06:34:26 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-03-30 06:34:26 +0000 |
commit | 0dc714a00f222c2d1ccf5822ec6ba99a82fc56e8 (patch) | |
tree | aea4701a7568d2d6ed1ce3717443165888e7be8b /clang/lib/AST/MicrosoftMangle.cpp | |
parent | 6190ee65e17245396a2db8316367e0f44411b321 (diff) | |
download | bcm5719-llvm-0dc714a00f222c2d1ccf5822ec6ba99a82fc56e8.tar.gz bcm5719-llvm-0dc714a00f222c2d1ccf5822ec6ba99a82fc56e8.zip |
MS ABI: Simplify MangleByte
The delta between '\xe1' and '\xc1' is equivalent to the one between 'a'
and 'A'. This allows us to reuse the computation between '\xe1' and
'\xfa' for the '\xc1' to '\xda' case.
No functionality change.
llvm-svn: 205128
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 9dfd2af8bb6..5510f96596f 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -2421,9 +2421,8 @@ void MicrosoftMangleContextImpl::mangleStringLiteral(const StringLiteral *SL, if ((Byte >= 'a' && Byte <= 'z') || (Byte >= 'A' && Byte <= 'Z') || (Byte >= '0' && Byte <= '9') || Byte == '_' || Byte == '$') { Mangler.getStream() << Byte; - } else if (Byte >= '\xe1' && Byte <= '\xfa') { - Mangler.getStream() << '?' << static_cast<char>('a' + (Byte - '\xe1')); - } else if (Byte >= '\xc1' && Byte <= '\xda') { + } else if ((Byte >= '\xe1' && Byte <= '\xfa') || + (Byte >= '\xc1' && Byte <= '\xda')) { Mangler.getStream() << '?' << static_cast<char>('A' + (Byte - '\xc1')); } else { switch (Byte) { |