forked from OSchip/llvm-project
[llgo] drop debug/DIBuilder.Declare
Summary: Companion to D11864, which updates the DIBuilder bindings to match a recent change in the underlying API. We drop the debug/DIBuilder.Declare method for now, which is unused, as otherwise it will be broken with the new DIBuilder API in the Go bindings. Reviewers: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11891 llvm-svn: 246545
This commit is contained in:
parent
1dcfb7a1e6
commit
3b138079c9
|
@ -147,31 +147,6 @@ func (d *DIBuilder) PopFunction() {
|
|||
d.fnFile = ""
|
||||
}
|
||||
|
||||
// Declare creates an llvm.dbg.declare call for the specified function
|
||||
// parameter or local variable.
|
||||
func (d *DIBuilder) Declare(b llvm.Builder, v ssa.Value, llv llvm.Value, paramIndex int) {
|
||||
tag := tagAutoVariable
|
||||
if paramIndex >= 0 {
|
||||
tag = tagArgVariable
|
||||
}
|
||||
var diFile llvm.Metadata
|
||||
var line int
|
||||
if file := d.fset.File(v.Pos()); file != nil {
|
||||
line = file.Line(v.Pos())
|
||||
diFile = d.getFile(file)
|
||||
}
|
||||
localVar := d.builder.CreateLocalVariable(d.scope(), llvm.DILocalVariable{
|
||||
Tag: tag,
|
||||
Name: llv.Name(),
|
||||
File: diFile,
|
||||
Line: line,
|
||||
ArgNo: paramIndex + 1,
|
||||
Type: d.DIType(v.Type()),
|
||||
})
|
||||
expr := d.builder.CreateExpression(nil)
|
||||
d.builder.InsertDeclareAtEnd(llv, localVar, expr, b.GetInsertBlock())
|
||||
}
|
||||
|
||||
// Value creates an llvm.dbg.value call for the specified register value.
|
||||
func (d *DIBuilder) Value(b llvm.Builder, v ssa.Value, llv llvm.Value, paramIndex int) {
|
||||
// TODO(axw)
|
||||
|
|
Loading…
Reference in New Issue