feat(cl): support Clang ext_vector_type declarations from C headers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Start with cl/type.go:toTypeEx and the CXType_ExtVector conversion path, then run the supplied llcppg reproducer with source/llcppg.cfg and simd_float4.h. Done means native extended-vector types and dependent declarations are retained with the target’s required layout and calling convention, with unsupported declarations still clearly identified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The libc/LibSystem header survey cannot retain Clang extended-vector types and their dependent matrix/function declarations. The smallest observed case is the SDK's simd_float4 typedef.
Reproducer
simd_float4.h, copied from the SDK declaration:
typedef __attribute__((__ext_vector_type__(4))) float simd_float4;
Use a source Go module requiring github.com/goplus/lib v0.7.0, with this configuration in source/llcppg.cfg:
{
"Name": "libc",
"Language": "c",
"Dir": "$GOOS-$GOARCH/include",
"Files": [
"simd_float4.h"
],
"FailFast": 0,
"IgnoreInline": true
}
Put the selected inputs under source/darwin-arm64/include, with the macOS 14.0 SDK headers available there where included. Leave Stdlib unset, and run:
GOOS=darwin GOARCH=arm64 llcppg ./generated ./source
Current result
Generation exits 0 but omits the type:
-: toType: unsupported type - (176: float __attribute__((ext_vector_type(4))))
176 is CXType_ExtVector. cl/type.go:toTypeEx has no conversion case for it. Parsing simd/math.h and simd/matrix.h produces many dependent skipped typedefs, records, variables and overloaded functions.
Requested support
Retain native extended-vector types and their dependent declarations with the target's required layout and calling convention. A same-size Go array alone is not sufficient evidence of vector ABI compatibility. The representation and any compiler requirements need to be established before selecting a mapping; this issue does not prescribe a new public helper API or fallback wrapper.
#1033 explicitly covers atomic/complex/128-bit/floating types and unprototyped function pointers, but does not include Clang extended vectors. Existing unsupported declarations should remain visibly identified until this support is implemented.
Environment
Reproduced on macOS/arm64 with LLVM/libclang 22.1.8, LLGo 1.0.9 and github.com/goplus/lib v0.7.0. The relevant installed generator sources were checked byte-for-byte against current main 90bd72cf. SDK-dependent cases use macOS 14.0 headers. These are generation-stage results, not cross-platform or ABI certification.
- Lingua principale
- Go
- Stelle
- 40
- Fork
- 13
- Merge medio
- 2h 4m
- PR unite (30g)
- 143
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di goplus/llcppg
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 6/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di goplus/llcppg
Issue simili
-
CLI: `describe <ns>.<table>` reports "namespace does not exist" when only the table is missingForse già presa @Shruthirdy l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
apache/iceberg-go#2423 ·
I maintainer di solito rispondono entro 2 giorni
-
post-v4
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
rishikanthc/Scriberr#506 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
microsoft/TypeScript#65290 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] rollingUpdatePartition panics when live StatefulSet replicas sit far below the desired countAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sgl-project/rbg#547 ·
I maintainer di solito rispondono entro 1 giorno