[PATCH] llgo: Generate llvm.dbg.value calls
Andrew Wilkins
axwalk at gmail.com
Sun Dec 14 22:28:01 PST 2014
Thanks for the review. I'll create a new revision when I've fixed it.
================
Comment at: debug/debug.go:97
@@ -96,3 +96,3 @@
}
- diFile := d.builder.CreateFile(d.remapFilePath(file.Name()), "")
+ diFile := d.builder.CreateFile(d.remapFilePath(file.Name()), d.cwd)
d.files[file] = diFile
----------------
pcc wrote:
> The cwd changes seem unrelated. Can you move those to a separate revision, please?
Note entirely unrelated, the metadata generated for files in getFile lacks directory names. I'll move it anyway, and keep this revision about DebugRefs.
================
Comment at: irgen/ssa.go:888
@@ +887,3 @@
+ }
+ fr.debug.Value(fr.builder, id.Name, fr.llvmvalue(instr.X), instr.X.Type(), id.Obj.Pos(), paramIndex)
+
----------------
pcc wrote:
> Perhaps you want to check `IsAddr` to decide whether to emit an `llvm.dbg.value` here or not?
Yes, thanks. This highlights another problem: if only the *address* of a local var is referenced, then only an address DebugRef gets generated. I'll need to rework this, since my assertions in the summary were wrong.
http://reviews.llvm.org/D6651
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list