Open kyouko-taiga opened 6 months ago
I thought they would provide a layer of type safety if we only unwrap them at the boundary with LLVM. Having our clients pass us raw OpaquePointer
s means they can easily give us the wrong kind of thing and we'll never know. That's the reason for the pointer-to-incomplete type trick in C, whose value is erased by import into Swift.
I suspect we can rework the API to avoid exposing any of the reference wrappers defined in
Refs.swift
. Those are completely useless unless one can access the value of the LLVM pointer or enum being wrapped and use it to call the C API directly. As the intent of the current setup is to keepllvmc
internal, using that API outside of SwiftyLLVM is not possible.