Apologies if I'm asking on the wrong place, because it's maybe more of a C++ inter-op question.
I'm trying to use llvm::Function through LLVM_Utils and/or LLVM_IR. Xcode's auto-completion shows this, which is confusing to me:

Then, when I try to build it, I get this error:
'Function' is not a member type of enum '__ObjC.llvm'
In the swift-llvm-bindings source is this line:
https://github.com/apple/swift-llvm-bindings/blob/b9b825218a945e450cbaf740a980284b323e09ca/Sources/LLVM/LLVM_Utils.swift#L58
Both Twine and Function are classes declared in the llvm namespace. The only difference is the LLVM_EXTERNAL_VISIBILITY macro for Function, but it expands to just [[gnu::visibility("default")]] on macOS.
Why does llvm.Twine work, but not llvm.Function? What should I do to make llvm.Function work?
Apologies if I'm asking on the wrong place, because it's maybe more of a C++ inter-op question.
I'm trying to use
llvm::FunctionthroughLLVM_Utilsand/orLLVM_IR. Xcode's auto-completion shows this, which is confusing to me:Then, when I try to build it, I get this error:
In the swift-llvm-bindings source is this line:
https://github.com/apple/swift-llvm-bindings/blob/b9b825218a945e450cbaf740a980284b323e09ca/Sources/LLVM/LLVM_Utils.swift#L58
Both
TwineandFunctionare classes declared in thellvmnamespace. The only difference is theLLVM_EXTERNAL_VISIBILITYmacro forFunction, but it expands to just[[gnu::visibility("default")]]on macOS.Why does
llvm.Twinework, but notllvm.Function? What should I do to makellvm.Functionwork?