[libcxx-commits] [libcxxabi] ecd0337 - [demangler][LoongArch] Correct the mangled_size for long double

Weining Lu via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 7 18:21:55 PST 2022


Author: Weining Lu
Date: 2022-12-08T10:21:20+08:00
New Revision: ecd0337854b98014df1953f644650480a898e7de

URL: https://github.com/llvm/llvm-project/commit/ecd0337854b98014df1953f644650480a898e7de
DIFF: https://github.com/llvm/llvm-project/commit/ecd0337854b98014df1953f644650480a898e7de.diff

LOG: [demangler][LoongArch] Correct the mangled_size for long double

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index 339982584f5f9..66213c63f2f85 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -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;

diff  --git a/llvm/include/llvm/Demangle/ItaniumDemangle.h b/llvm/include/llvm/Demangle/ItaniumDemangle.h
index ea55f4a635e28..0dd49ea91455b 100644
--- a/llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ b/llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -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;


        


More information about the libcxx-commits mailing list