[PATCH] irgen: don't emit debug metadata for locals
David Blaikie
dblaikie at gmail.com
Wed Jan 28 11:10:11 PST 2015
(might be useful to include [llgo] or something similar in the subject line
in the future to help reviewers filter/prioritize appropriately - took me a
moment to realize this wasn't something I needed to worry about)
On Tue, Jan 27, 2015 at 11:43 PM, Andrew Wilkins <axwalk at gmail.com> wrote:
> Hi pcc,
>
> The debug metadata we generate is wrong, and is
> now causing build failures. This revision disables
> the only llvm.dbg.declare calls we make.
>
> (There is also a drive-by fix to CMakeLists.txt,
> adding in a missing .go dependency.)
>
> http://reviews.llvm.org/D7222
>
> Files:
> CMakeLists.txt
> irgen/ssa.go
>
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt
> +++ CMakeLists.txt
> @@ -30,6 +30,7 @@
> irgen/slice.go
> irgen/ssa.go
> irgen/strings.go
> + irgen/switches.go
> irgen/targets.go
> irgen/typemap.go
> irgen/types.go
> Index: irgen/ssa.go
> ===================================================================
> --- irgen/ssa.go
> +++ irgen/ssa.go
> @@ -357,12 +357,7 @@
> prologueBlock := llvm.InsertBasicBlock(fr.blocks[0], "prologue")
> fr.builder.SetInsertPointAtEnd(prologueBlock)
>
> - // Map parameter positions to indices. We use this
> - // when processing locals to map back to parameters
> - // when generating debug metadata.
> - paramPos := make(map[token.Pos]int)
> for i, param := range f.Params {
> - paramPos[param.Pos()] = i
> llparam := fti.argInfos[i].decode(llvm.GlobalContext(),
> fr.builder, fr.builder)
> if isMethod && i == 0 {
> if _, ok :=
> param.Type().Underlying().(*types.Pointer); !ok {
> @@ -401,13 +396,6 @@
> bcalloca := fr.builder.CreateBitCast(alloca,
> llvm.PointerType(llvm.Int8Type(), 0), "")
> value := newValue(bcalloca, local.Type())
> fr.env[local] = value
> - if fr.GenerateDebug {
> - paramIndex, ok := paramPos[local.Pos()]
> - if !ok {
> - paramIndex = -1
> - }
> - fr.debug.Declare(fr.builder, local, alloca,
> paramIndex)
> - }
> }
>
> // If the function contains any defers, we must first create
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150128/c9f92e27/attachment.html>
More information about the llvm-commits
mailing list