Open tf2spi opened 1 month ago
@llvm/issue-subscribers-debuginfo
Author: None (tf2spi)
This is a fine bug, thanks for filing it!
Though it's probably not something high on anyone's list to fix, unfortunately - and possibly to move it forward it'd be best if you could provide a pull request for the desired functionality - it's probably not too hard to plumb through, if it's already in DIBuilder?
Looking at how the C bindings work, I also suspect that it wouldn't be too hard to plumb. The hardest part would be getting familiar with the project but it's probably a worthwhile investment in any case. Thanks for the quick reply!
These are a general list of DIBuilder
functions that also don't have C bindings that I found from eyeballing. I'm not sure where these should be documented or if documenting these cases would be desirable right now.
llvm::DIBuilder::createEnumerator
- APSInt
llvm::DIBuilder::createStringType
llvm::DIBuilder::createPtrAuthQualifiedType
llvm::DIBuilder::createTemplateAlias
llvm::DIBuilder::createFriend
llvm::DIBuilder::createVariantMemberType
llvm::DIBuilder::createVariantPart
llvm::DIBuilder::createTemplateTypeParameter
llvm::DIBuilder::createTemplateValueParameter
llvm::DIBuilder::createTemplateTemplateParameter
- TemplateTempleateParameterMetadataKind?
llvm::DIBuilder::createTemplateParameterPack
llvm::DIBuilder::createSetType
llvm::DIBuilder::retainType
llvm::DIBuilder::createUnspecifiedParameter
llvm::DIBuilder::getOrCreateMacroArray
llvm::DIBuilder::getOrCreateGenericSubrange
llvm::DIBuilder::createTempFunctionFwdDecl
llvm::DIBuilder::createMethod
llvm::DIBuilder::createCommonBlock
llvm::DIBuilder::replaceVTableHolder
llvm::DIBuilder::replaceArrays
llvm::DIBuilder::replaceTemporary
Hello LLVM Team,
This is my first issue request in LLVM, so apologies if I've misspoken or acted poorly for any reason.
I'm currently using the LLVM-C bindings in a PR for Odin Lang and a really nice API in LLVM that's unfortunately missing in the C bindings is llvm::DIBuilder::createLabel and llvm::DIBuilder::insertLabel which are helpful when outputting debug info for various labels in Odin. There's even the LLVMDILabelMetadataKind kind but no way to actually make a DILabel from the C API as far as I'm aware.
For UNIX-like platforms, I was still able to link to the C++ function directly and use the C references which are wrappers around the C++ types. However, we have a build of the LLVM C DLL for Windows in the repo which does not export the C++ functions so it's not feasible right now to output debug info for labels on Windows.
In both cases, it would be more ideal if these were exported as C functions that we could then use in Odin. Programming languages with labels and whose compilers are written in C, whether now or in the future, would likely appreciate this as well.