r205128 - MS ABI: Simplify MangleByte

David Majnemer david.majnemer at gmail.com
Mon Mar 31 10:16:35 PDT 2014


I added some text in r205223.

-- 
David Majnemer

On Mon Mar 31 2014 at 9:18:47 AM, Jordan Rose <jordan_rose at apple.com> wrote:

> Can you put that in a comment? Right now it's a bit opaque.
>
> Jordan
>
> On Mar 29, 2014, at 23:34 , David Majnemer <david.majnemer at gmail.com>
> wrote:
>
> > Author: majnemer
> > Date: Sun Mar 30 01:34:26 2014
> > New Revision: 205128
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=205128&view=rev
> > Log:
> > 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.
> >
> > Modified:
> >    cfe/trunk/lib/AST/MicrosoftMangle.cpp
> >
> > Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
> > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/
> MicrosoftMangle.cpp?rev=205128&r1=205127&r2=205128&view=diff
> > ============================================================
> ==================
> > --- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
> > +++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Sun Mar 30 01:34:26 2014
> > @@ -2421,9 +2421,8 @@ void MicrosoftMangleContextImpl::mangleS
> >     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) {
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140331/264c447f/attachment.html>


More information about the cfe-commits mailing list