cl: switch debug symbols with LLGO_DEBUG

This commit is contained in:
Li Jie
2024-09-21 21:09:16 +08:00
parent 88b980ac17
commit dad22b1686
11 changed files with 43 additions and 68 deletions

View File

@@ -130,10 +130,10 @@ func testFrom(t *testing.T, pkgDir, sel string, byLLGen bool) {
out := pkgDir + "/out.ll"
dbg := isDbgSymEnabled(pkgDir + "/flags.txt")
if dbg {
cl.EnableDebugSymbols()
cl.EnableDebugSymbols(true)
defer cl.EnableDebugSymbols(false)
cl.DebugSymbols() // just for coverage
}
defer cl.DisableDebugSymbols()
b, err := os.ReadFile(out)
if err != nil {
t.Fatal("ReadFile failed:", err)