cl: pkgFNoOldInit flag if no initFnNameOld
This commit is contained in:
@@ -111,6 +111,8 @@ const (
|
|||||||
pkgNormal pkgState = iota
|
pkgNormal pkgState = iota
|
||||||
pkgHasPatch
|
pkgHasPatch
|
||||||
pkgInPatch
|
pkgInPatch
|
||||||
|
|
||||||
|
pkgFNoOldInit = 0x80 // flag if no initFnNameOld
|
||||||
)
|
)
|
||||||
|
|
||||||
func (p *context) inMain(instr ssa.Instruction) bool {
|
func (p *context) inMain(instr ssa.Instruction) bool {
|
||||||
@@ -773,6 +775,9 @@ func NewPackageEx(prog llssa.Program, patches Patches, pkg *ssa.Package, files [
|
|||||||
skips := ctx.skips
|
skips := ctx.skips
|
||||||
ctx.skips = nil
|
ctx.skips = nil
|
||||||
ctx.state = pkgInPatch
|
ctx.state = pkgInPatch
|
||||||
|
if _, ok := skips["init"]; ok || ctx.skipall {
|
||||||
|
ctx.state |= pkgFNoOldInit
|
||||||
|
}
|
||||||
processPkg(ctx, ret, alt)
|
processPkg(ctx, ret, alt)
|
||||||
ctx.state = pkgHasPatch
|
ctx.state = pkgHasPatch
|
||||||
ctx.skips = skips
|
ctx.skips = skips
|
||||||
|
|||||||
Reference in New Issue
Block a user