[PATCH] [-cxx-abi microsoft] INT_MIN is mangled like -INT_MIN
David Majnemer
david.majnemer at gmail.com
Tue Aug 13 04:05:52 PDT 2013
On Tue, Aug 13, 2013 at 3:48 AM, Timur Iskhodzhanov <timurrrr at google.com>wrote:
> 2013/8/13 David Majnemer <david.majnemer at gmail.com>:
> > + //
> > + // N.B. The representation of signed values that are their smallest
> possible
> > + // value omits the question mark.
> > + if (Value.isSigned() && Value.isNegative() &&
> !Value.isMinSignedValue()) {
> > Out << '?';
> > mangleNumber(llvm::APSInt(Value.abs()));
> > return;
> > Index: test/CodeGenCXX/mangle-ms-templates.cpp
> > ===================================================================
> > --- test/CodeGenCXX/mangle-ms-templates.cpp
> > +++ test/CodeGenCXX/mangle-ms-templates.cpp
> > @@ -108,6 +108,10 @@
> > IntTemplate<65535> ffff;
> > // CHECK: call {{.*}} @"\01??0?$IntTemplate@$0PPPP@@@QAE at XZ"
> > // X64: call {{.*}} @"\01??0?$IntTemplate@$0PPPP@@@QEAA at XZ"
> > +
> > + IntTemplate<-2147483648> IntMin;
> > +// CHECK: call {{.*}} @"\01??0?$IntTemplate@$0IAAAAAAA@@@QAE at XZ"
> > +// X64: call {{.*}} @"\01??0?$IntTemplate@$0IAAAAAAA@@@QEAA at XZ"
>
> Are there any cases when a non-int signed value is mangled?
>
No, which means that this patch is wrong. :(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130813/af1e9de9/attachment.html>
More information about the cfe-commits
mailing list