================ @@ -280,14 +280,18 @@ static void initRISCVFeature(struct riscv_hwprobe Hwprobes[]) { static int FeaturesBitCached = 0; -void __init_riscv_feature_bits() CONSTRUCTOR_ATTRIBUTE; +void __init_riscv_feature_bits(void *) CONSTRUCTOR_ATTRIBUTE; // A constructor function that sets __riscv_feature_bits, and // __riscv_vendor_feature_bits to the right values. This needs to run // only once. This constructor is given the highest priority and it should // run before constructors without the priority set. However, it still runs // after ifunc initializers and needs to be called explicitly there. -void CONSTRUCTOR_ATTRIBUTE __init_riscv_feature_bits() { + +// PlatformArgs allows the platform to provide pre-computed data and access it +// without extra effort. For example, Linux could pass the vDSO object to avoid +// an extra system call. +void CONSTRUCTOR_ATTRIBUTE __init_riscv_feature_bits(void *PlatformArgs) { ---------------- jrtc27 wrote:
If it's a constructor, how can it receive a value? And if it's a constructor, why is Clang also calling it? https://github.com/llvm/llvm-project/pull/101472 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits