Skip to content

Commit 1a3f68d

Browse files
committed
add GetDebugMacro function to control Macro log output
1 parent 7530a45 commit 1a3f68d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

_xtool/llcppsigfetch/dbg/debug.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const (
99
DbgVisitTop
1010
DbgProcess
1111
DbgGetCurFile
12+
DbgMacro
1213
DbgFlagAll = DbgParse
1314
)
1415

@@ -47,3 +48,11 @@ func SetDebugGetCurFile() {
4748
func GetDebugGetCurFile() bool {
4849
return flags&DbgGetCurFile != 0
4950
}
51+
52+
func SetDebugMacro() {
53+
flags |= DbgMacro
54+
}
55+
56+
func GetDebugMacro() bool {
57+
return flags&DbgMacro != 0
58+
}

_xtool/llcppsigfetch/parse/parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func Do(cfg *ParseConfig) (*Converter, error) {
9090
if err != nil {
9191
return nil, err
9292
}
93-
if dbg.GetDebugParse() {
93+
if dbg.GetDebugMacro() {
9494
fmt.Fprintln(os.Stderr, "Have %d Macros", len(pkg.File.Macros))
9595
for _, macro := range pkg.File.Macros {
9696
fmt.Fprintf(os.Stderr, "Macro %s", macro.Name)

0 commit comments

Comments
 (0)