Skip to content

Commit 80c5ccd

Browse files
authored
[libc][math] Fix missing const in hdrgen signatures for totalordermag* (#103935)
1 parent 019ef52 commit 80c5ccd

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

libc/newhdrgen/yaml/math.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,37 +2361,37 @@ functions:
23612361
- stdc
23622362
return_type: int
23632363
arguments:
2364-
- type: double *
2365-
- type: double *
2364+
- type: const double *
2365+
- type: const double *
23662366
- name: totalordermagf
23672367
standards:
23682368
- stdc
23692369
return_type: int
23702370
arguments:
2371-
- type: float *
2372-
- type: float *
2371+
- type: const float *
2372+
- type: const float *
23732373
- name: totalordermagl
23742374
standards:
23752375
- stdc
23762376
return_type: int
23772377
arguments:
2378-
- type: long double *
2379-
- type: long double *
2378+
- type: const long double *
2379+
- type: const long double *
23802380
- name: totalordermagf128
23812381
standards:
23822382
- stdc
23832383
return_type: int
23842384
arguments:
2385-
- type: float128 *
2386-
- type: float128 *
2385+
- type: const float128 *
2386+
- type: const float128 *
23872387
guard: LIBC_TYPES_HAS_FLOAT128
23882388
- name: totalordermagf16
23892389
standards:
23902390
- stdc
23912391
return_type: int
23922392
arguments:
2393-
- type: _Float16 *
2394-
- type: _Float16 *
2393+
- type: const _Float16 *
2394+
- type: const _Float16 *
23952395
guard: LIBC_TYPES_HAS_FLOAT16
23962396
- name: trunc
23972397
standards:

libc/spec/stdc.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -752,11 +752,11 @@ def StdC : StandardSpec<"stdc"> {
752752
GuardedFunctionSpec<"totalorderf16", RetValSpec<IntType>, [ArgSpec<ConstFloat16Ptr>, ArgSpec<ConstFloat16Ptr>], "LIBC_TYPES_HAS_FLOAT16">,
753753
GuardedFunctionSpec<"totalorderf128", RetValSpec<IntType>, [ArgSpec<ConstFloat128Ptr>, ArgSpec<ConstFloat128Ptr>], "LIBC_TYPES_HAS_FLOAT128">,
754754

755-
FunctionSpec<"totalordermag", RetValSpec<IntType>, [ArgSpec<DoublePtr>, ArgSpec<DoublePtr>]>,
756-
FunctionSpec<"totalordermagf", RetValSpec<IntType>, [ArgSpec<FloatPtr>, ArgSpec<FloatPtr>]>,
757-
FunctionSpec<"totalordermagl", RetValSpec<IntType>, [ArgSpec<LongDoublePtr>, ArgSpec<LongDoublePtr>]>,
758-
GuardedFunctionSpec<"totalordermagf16", RetValSpec<IntType>, [ArgSpec<Float16Ptr>, ArgSpec<Float16Ptr>], "LIBC_TYPES_HAS_FLOAT16">,
759-
GuardedFunctionSpec<"totalordermagf128", RetValSpec<IntType>, [ArgSpec<Float128Ptr>, ArgSpec<Float128Ptr>], "LIBC_TYPES_HAS_FLOAT128">,
755+
FunctionSpec<"totalordermag", RetValSpec<IntType>, [ArgSpec<ConstDoublePtr>, ArgSpec<ConstDoublePtr>]>,
756+
FunctionSpec<"totalordermagf", RetValSpec<IntType>, [ArgSpec<ConstFloatPtr>, ArgSpec<ConstFloatPtr>]>,
757+
FunctionSpec<"totalordermagl", RetValSpec<IntType>, [ArgSpec<ConstLongDoublePtr>, ArgSpec<ConstLongDoublePtr>]>,
758+
GuardedFunctionSpec<"totalordermagf16", RetValSpec<IntType>, [ArgSpec<ConstFloat16Ptr>, ArgSpec<ConstFloat16Ptr>], "LIBC_TYPES_HAS_FLOAT16">,
759+
GuardedFunctionSpec<"totalordermagf128", RetValSpec<IntType>, [ArgSpec<ConstFloat128Ptr>, ArgSpec<ConstFloat128Ptr>], "LIBC_TYPES_HAS_FLOAT128">,
760760

761761
FunctionSpec<"getpayload", RetValSpec<DoubleType>, [ArgSpec<DoublePtr>]>,
762762
FunctionSpec<"getpayloadf", RetValSpec<FloatType>, [ArgSpec<FloatPtr>]>,

0 commit comments

Comments
 (0)