build: #3893 do not return LLVM structs from Build

This commit is contained in:
Kenneth Bell
2023-09-11 23:27:47 +01:00
committed by Ayke
parent 13a8eae0d4
commit 58fafaeb5c
4 changed files with 11 additions and 15 deletions
+4 -4
View File
@@ -35,14 +35,14 @@ func isRecoverableError(err error) bool {
// ErrorLine is one line in a traceback. The position may be missing.
type ErrorLine struct {
Pos token.Position
Inst llvm.Value
Inst string
}
// Error encapsulates compile-time interpretation errors with an associated
// import path. The errors may not have a precise location attached.
type Error struct {
ImportPath string
Inst llvm.Value
Inst string
Pos token.Position
Err error
Traceback []ErrorLine
@@ -60,10 +60,10 @@ func (r *runner) errorAt(inst instruction, err error) *Error {
pos := getPosition(inst.llvmInst)
return &Error{
ImportPath: r.pkgName,
Inst: inst.llvmInst,
Inst: inst.String(),
Pos: pos,
Err: err,
Traceback: []ErrorLine{{pos, inst.llvmInst}},
Traceback: []ErrorLine{{pos, inst.String()}},
}
}