diff options
Diffstat (limited to 'bindings/go/llvm/DIBuilderBindings.cpp')
-rw-r--r-- | bindings/go/llvm/DIBuilderBindings.cpp | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/bindings/go/llvm/DIBuilderBindings.cpp b/bindings/go/llvm/DIBuilderBindings.cpp index df5885de25c4..e767144bb322 100644 --- a/bindings/go/llvm/DIBuilderBindings.cpp +++ b/bindings/go/llvm/DIBuilderBindings.cpp @@ -74,23 +74,34 @@ LLVMMetadataRef LLVMDIBuilderCreateFunction( LLVMDIBuilderRef Dref, LLVMMetadataRef Scope, const char *Name, const char *LinkageName, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition, - unsigned ScopeLine, unsigned Flags, int IsOptimized, LLVMValueRef Func) { + unsigned ScopeLine, unsigned Flags, int IsOptimized) { DIBuilder *D = unwrap(Dref); return wrap(D->createFunction(unwrap<DIScope>(Scope), Name, LinkageName, File ? unwrap<DIFile>(File) : nullptr, Line, unwrap<DISubroutineType>(CompositeType), IsLocalToUnit, IsDefinition, ScopeLine, Flags, - IsOptimized, unwrap<Function>(Func))); + IsOptimized)); } -LLVMMetadataRef LLVMDIBuilderCreateLocalVariable( - LLVMDIBuilderRef Dref, unsigned Tag, LLVMMetadataRef Scope, - const char *Name, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, - int AlwaysPreserve, unsigned Flags, unsigned ArgNo) { +LLVMMetadataRef +LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef Dref, LLVMMetadataRef Scope, + const char *Name, LLVMMetadataRef File, + unsigned Line, LLVMMetadataRef Ty, + int AlwaysPreserve, unsigned Flags) { + DIBuilder *D = unwrap(Dref); + return wrap(D->createAutoVariable(unwrap<DIScope>(Scope), Name, + unwrap<DIFile>(File), Line, + unwrap<DIType>(Ty), AlwaysPreserve, Flags)); +} + +LLVMMetadataRef LLVMDIBuilderCreateParameterVariable( + LLVMDIBuilderRef Dref, LLVMMetadataRef Scope, const char *Name, + unsigned ArgNo, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, + int AlwaysPreserve, unsigned Flags) { DIBuilder *D = unwrap(Dref); - return wrap(D->createLocalVariable( - Tag, unwrap<DIScope>(Scope), Name, unwrap<DIFile>(File), Line, - unwrap<DIType>(Ty), AlwaysPreserve, Flags, ArgNo)); + return wrap(D->createParameterVariable( + unwrap<DIScope>(Scope), Name, ArgNo, unwrap<DIFile>(File), Line, + unwrap<DIType>(Ty), AlwaysPreserve, Flags)); } LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref, @@ -117,8 +128,7 @@ LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Dref, LLVMMetadataRef File, LLVMMetadataRef ParameterTypes) { DIBuilder *D = unwrap(Dref); return wrap( - D->createSubroutineType(File ? unwrap<DIFile>(File) : nullptr, - DITypeRefArray(unwrap<MDTuple>(ParameterTypes)))); + D->createSubroutineType(DITypeRefArray(unwrap<MDTuple>(ParameterTypes)))); } LLVMMetadataRef LLVMDIBuilderCreateStructType( |