diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h index ac7ee5a7cc9a1..6e02313c3d298 100644 --- a/llvm/include/llvm-c/DebugInfo.h +++ b/llvm/include/llvm-c/DebugInfo.h @@ -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. @@ -877,9 +885,9 @@ LLVMDIBuilderCreateObjCProperty(LLVMDIBuilderRef Builder, * \param Implicit Indicates whether this pointer was implicitly generated * (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 diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 4ce518009bd3e..6ff0d280081fd 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -1433,10 +1433,16 @@ LLVMDIBuilderCreateObjCProperty(LLVMDIBuilderRef Builder, } LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder, - LLVMMetadataRef Type, - LLVMBool Implicit) { + LLVMMetadataRef Type) { return wrap(unwrap(Builder)->createObjectPointerType(unwrapDI(Type), - Implicit)); + /*Implicit=*/false)); +} + +LLVMMetadataRef +LLVMDIBuilderCreateImplicitObjectPointerType(LLVMDIBuilderRef Builder, + LLVMMetadataRef Type) { + return wrap(unwrap(Builder)->createObjectPointerType(unwrapDI(Type), + /*Implicit=*/true)); } LLVMMetadataRef