diff options
-rw-r--r-- | llgo/CMakeLists.txt | 1 | ||||
-rw-r--r-- | llgo/irgen/ssa.go | 12 |
2 files changed, 1 insertions, 12 deletions
diff --git a/llgo/CMakeLists.txt b/llgo/CMakeLists.txt index 9a93a4ba2ef..e9b6bc55c8c 100644 --- a/llgo/CMakeLists.txt +++ b/llgo/CMakeLists.txt @@ -30,6 +30,7 @@ llvm_add_go_executable(llgo llvm.org/llgo/cmd/gllgo ALL DEPENDS irgen/slice.go irgen/ssa.go irgen/strings.go + irgen/switches.go irgen/targets.go irgen/typemap.go irgen/types.go diff --git a/llgo/irgen/ssa.go b/llgo/irgen/ssa.go index e2be8747da9..90e0a444ba6 100644 --- a/llgo/irgen/ssa.go +++ b/llgo/irgen/ssa.go @@ -357,12 +357,7 @@ func (u *unit) defineFunction(f *ssa.Function) { 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 @@ func (u *unit) defineFunction(f *ssa.Function) { 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 |