[compiler-rt] [compiler-rt][RISCV] Initialize length only when  __init_riscv_feature… (PR #115449)
    Sam Elliott via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Nov  8 04:28:10 PST 2024
    
    
  
================
@@ -369,6 +366,9 @@ void __init_riscv_feature_bits(void *PlatformArgs) {
     return;
 
   initRISCVFeature(Hwprobes);
+
+  __riscv_feature_bits.length = RISCV_FEATURE_BITS_LENGTH;
+  __riscv_vendor_feature_bits.length = RISCV_VENDOR_FEATURE_BITS_LENGTH;
----------------
lenary wrote:
This would work, but it might be more obvious if this was moved into `initRISCVFeature`, maybe where the other fields in the structure are being set?
https://github.com/llvm/llvm-project/pull/115449
    
    
More information about the llvm-commits
mailing list