[LLVMdev] [un]wrapping llvm:DITypeRef

Rodney M. Bates rodney_bates at lcwb.coop
Sat Jul 25 15:44:07 PDT 2015


In trying to write a C binding for DIBuilder of llvm 3.6.1, I can't see a way to unwrap
llvm::DITypeRef, declared in include/llvm/IR/DebugInfo.h.  This is a class with one
data member, a pointer to Metadata.

If I try to make my C type a struct with one pointer, I can't cast it to DITypeRef.
If I try to go inside the classes and use the pointer, I can cast, but can't construct
a DITypeRef when unwrapping, as both its pointer field 'Val' and the constructor are
private.
-- 
Rodney Bates
rodney.m.bates at acm.org



More information about the llvm-dev mailing list