[PATCH] D22905: [llgo] set debuglocs for calls in synthetic functions

Andrew Wilkins via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 21:49:35 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL288772: [llgo] set debuglocs for calls in synthetic functions (authored by axw).

Changed prior to commit:
  https://reviews.llvm.org/D22905?vs=65885&id=80379#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D22905

Files:
  llgo/trunk/debug/debug.go
  llgo/trunk/irgen/ssa.go


Index: llgo/trunk/irgen/ssa.go
===================================================================
--- llgo/trunk/irgen/ssa.go
+++ llgo/trunk/irgen/ssa.go
@@ -327,7 +327,7 @@
 	fr.addCommonFunctionAttrs(fr.function)
 	fr.function.SetLinkage(linkage)
 
-	fr.logf("Define function: %s", f.String())
+	fr.logf("Define function: %s @ %s", f.String(), fr.pkg.Prog.Fset.Position(f.Pos()))
 	fti := u.llvmtypes.getSignatureInfo(f.Signature)
 	delete(u.undefinedFuncs, f)
 	fr.retInf = fti.retInf
Index: llgo/trunk/debug/debug.go
===================================================================
--- llgo/trunk/debug/debug.go
+++ llgo/trunk/debug/debug.go
@@ -154,9 +154,6 @@
 
 // SetLocation sets the current debug location.
 func (d *DIBuilder) SetLocation(b llvm.Builder, pos token.Pos) {
-	if !pos.IsValid() {
-		return
-	}
 	position := d.fset.Position(pos)
 	d.lb = llvm.Metadata{}
 	if position.Filename != d.fnFile && position.Filename != "" {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22905.80379.patch
Type: text/x-patch
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161206/5615f192/attachment.bin>


More information about the llvm-commits mailing list