[PATCH] [-cxx-abi microsoft] INT_MIN is mangled like -INT_MIN

Timur Iskhodzhanov timurrrr at google.com
Tue Aug 13 03:48:34 PDT 2013


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?



More information about the cfe-commits mailing list