[PATCH] D51970: [bindings/go] Add DebugLoc parameter to InsertXXXAtEnd()

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 13 14:18:06 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL342179: [bindings/go] Add DebugLoc parameter to InsertXXXAtEnd() (authored by pcc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D51970?vs=165043&id=165377#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51970

Files:
  llvm/trunk/bindings/go/llvm/dibuilder.go


Index: llvm/trunk/bindings/go/llvm/dibuilder.go
===================================================================
--- llvm/trunk/bindings/go/llvm/dibuilder.go
+++ llvm/trunk/bindings/go/llvm/dibuilder.go
@@ -565,15 +565,19 @@
 
 // InsertDeclareAtEnd inserts a call to llvm.dbg.declare at the end of the
 // specified basic block for the given value and associated debug metadata.
-func (d *DIBuilder) InsertDeclareAtEnd(v Value, diVarInfo, expr Metadata, bb BasicBlock) Value {
-	result := C.LLVMDIBuilderInsertDeclareAtEnd(d.ref, v.C, diVarInfo.C, expr.C, nil, bb.C)
+func (d *DIBuilder) InsertDeclareAtEnd(v Value, diVarInfo, expr Metadata, l DebugLoc, bb BasicBlock) Value {
+	loc := C.LLVMDIBuilderCreateDebugLocation(
+		d.m.Context().C, C.uint(l.Line), C.uint(l.Col), l.Scope.C, l.InlinedAt.C)
+	result := C.LLVMDIBuilderInsertDeclareAtEnd(d.ref, v.C, diVarInfo.C, expr.C, loc, bb.C)
 	return Value{C: result}
 }
 
 // InsertValueAtEnd inserts a call to llvm.dbg.value at the end of the
 // specified basic block for the given value and associated debug metadata.
-func (d *DIBuilder) InsertValueAtEnd(v Value, diVarInfo, expr Metadata, bb BasicBlock) Value {
-	result := C.LLVMDIBuilderInsertDbgValueAtEnd(d.ref, v.C, diVarInfo.C, expr.C, nil, bb.C)
+func (d *DIBuilder) InsertValueAtEnd(v Value, diVarInfo, expr Metadata, l DebugLoc, bb BasicBlock) Value {
+	loc := C.LLVMDIBuilderCreateDebugLocation(
+		d.m.Context().C, C.uint(l.Line), C.uint(l.Col), l.Scope.C, l.InlinedAt.C)
+	result := C.LLVMDIBuilderInsertDbgValueAtEnd(d.ref, v.C, diVarInfo.C, expr.C, loc, bb.C)
 	return Value{C: result}
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51970.165377.patch
Type: text/x-patch
Size: 1612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180913/08d27819/attachment.bin>


More information about the llvm-commits mailing list