Add DIBuilder Type APIs to C API
ClosedPublic

Authored by harlanhaskins on Nov 2 2017, 1:17 PM.

Details

Summary

This builds off of r317135 and implements the suite of DebugInfo APIs
for constructing types.

This includes:

  • LLVMDIBuilderCreateSubroutineType
  • LLVMDIBuilderCreateEnumerationType
  • LLVMDIBuilderCreateUnionType
  • LLVMDIBuilderCreateArrayType
  • LLVMDIBuilderCreateVectorType
  • LLVMDIBuilderCreateUnspecifiedType
  • LLVMDIBuilderCreateBasicType
  • LLVMDIBuilderCreatePointerType
  • LLVMDIBuilderCreateStructType
  • LLVMDIBuilderCreateMemberType
  • LLVMDIBuilderCreateStaticMemberType
  • LLVMDIBuilderCreateMemberPointerType
  • LLVMDIBuilderCreateObjectPointerType
  • LLVMDIBuilderCreateQualifiedType
  • LLVMDIBuilderCreateReferenceType
  • LLVMDIBuilderCreateNullPtrType
  • LLVMDIBuilderCreateReplaceableCompositeType
  • LLVMDIBuilderCreateReplaceableCompositeType
  • LLVMDIBuilderCreateBitFieldMemberType
  • LLVMDIBuilderCreateClassType
  • LLVMDIBuilderCreateArtificialType

Add some type APIs to the test file

Diff Detail

harlanhaskins created this revision.Nov 2 2017, 1:17 PM

This needs more comprehensive testing but I wanted to get an initial code review pass over this. Thanks y'all!

whitequark accepted this revision.Nov 2 2017, 1:44 PM
This revision is now accepted and ready to land.Nov 2 2017, 1:44 PM
  • Update comments to /** style
  • Fix c-style doc comment

@harlanhaskins Since you already have one patch in, can you please ask for commit access (see the LLVM docs for how to do it) and commit this yourself?

Before I commit this: @echristo this is also going to obviate some of the Go bindings and require changes...

I'm fine adding these. I'd appreciate not breaking the go bindings so updating those would be great if you can.

Also, yes please get commit access :)

-eric

CodaFi added inline comments.Mar 14 2018, 11:19 AM
lib/IR/DebugInfo.cpp
936

Two things:

  • This can have DIFlags.
  • The type here differs from go, so you'll need to update bindings/go/llvm/dibuilder.go or rename theirs.
  • Rebase on master

Fix Go bindings

harlanhaskins marked an inline comment as done.Mar 20 2018, 12:07 PM

@echristo Do these Go bindings changes look good?

@whitequark Do the Go bindings changes look good to you? If so, I'll commit this.

echristo accepted this revision.Thu, Mar 29, 2:23 PM

If they're working in your testing I'm ok with it FWIW.

whitequark accepted this revision.Fri, Mar 30, 1:12 AM
harlanhaskins closed this revision.Sun, Apr 1, 8:07 PM

Closed by revision rL328953.