Skip to content

[C-API] Preserve backwards compatability for LLVMDIBuilderCreateObjectPointerType #124144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions llvm/include/llvm-c/DebugInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,14 @@ LLVMDIBuilderCreateObjCProperty(LLVMDIBuilderRef Builder,
unsigned PropertyAttributes,
LLVMMetadataRef Ty);

/**
* Create a uniqued DIType* clone with FlagObjectPointer.
* \param Builder The DIBuilder.
* \param Type The underlying type to which this pointer points.
*/
LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder,
LLVMMetadataRef Type);

/**
* Create a uniqued DIType* clone with FlagObjectPointer. If \c Implicit
* is true, then also set FlagArtificial.
Expand All @@ -877,9 +885,9 @@ LLVMDIBuilderCreateObjCProperty(LLVMDIBuilderRef Builder,
* \param Implicit Indicates whether this pointer was implicitly generated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should update the doxygen comments

* (i.e., not spelled out in source).
*/
LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder,
LLVMMetadataRef Type,
LLVMBool Implicit);
LLVMMetadataRef
LLVMDIBuilderCreateImplicitObjectPointerType(LLVMDIBuilderRef Builder,
LLVMMetadataRef Type);

/**
* Create debugging information entry for a qualified
Expand Down
12 changes: 9 additions & 3 deletions llvm/lib/IR/DebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1433,10 +1433,16 @@ LLVMDIBuilderCreateObjCProperty(LLVMDIBuilderRef Builder,
}

LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder,
LLVMMetadataRef Type,
LLVMBool Implicit) {
LLVMMetadataRef Type) {
return wrap(unwrap(Builder)->createObjectPointerType(unwrapDI<DIType>(Type),
Implicit));
/*Implicit=*/false));
}

LLVMMetadataRef
LLVMDIBuilderCreateImplicitObjectPointerType(LLVMDIBuilderRef Builder,
LLVMMetadataRef Type) {
return wrap(unwrap(Builder)->createObjectPointerType(unwrapDI<DIType>(Type),
/*Implicit=*/true));
}

LLVMMetadataRef
Expand Down
Loading