[demangler][LoongArch] Correct the mangled_size for long double
authorWeining Lu <luweining@loongson.cn>
Thu, 8 Dec 2022 02:21:16 +0000 (10:21 +0800)
committerWeining Lu <luweining@loongson.cn>
Thu, 8 Dec 2022 02:21:20 +0000 (10:21 +0800)
The size of long double in LoongArch (both LA32 and LA64) is 16 bytes, thus
the mangled_size should be 32.

This is same as RISCV's change in D126480.

Reviewed By: xen0n

Differential Revision: https://reviews.llvm.org/D138981

libcxxabi/src/demangle/ItaniumDemangle.h
llvm/include/llvm/Demangle/ItaniumDemangle.h

index 3399825..66213c6 100644 (file)
@@ -5119,7 +5119,7 @@ template <>
 struct FloatData<long double>
 {
 #if defined(__mips__) && defined(__mips_n64) || defined(__aarch64__) || \
-    defined(__wasm__) || defined(__riscv)
+    defined(__wasm__) || defined(__riscv) || defined(__loongarch__)
     static const size_t mangled_size = 32;
 #elif defined(__arm__) || defined(__mips__) || defined(__hexagon__)
     static const size_t mangled_size = 16;
index ea55f4a..0dd49ea 100644 (file)
@@ -5119,7 +5119,7 @@ template <>
 struct FloatData<long double>
 {
 #if defined(__mips__) && defined(__mips_n64) || defined(__aarch64__) || \
-    defined(__wasm__) || defined(__riscv)
+    defined(__wasm__) || defined(__riscv) || defined(__loongarch__)
     static const size_t mangled_size = 32;
 #elif defined(__arm__) || defined(__mips__) || defined(__hexagon__)
     static const size_t mangled_size = 16;