func (pac *Package) initFileIds() error { pac.fileIds = NewSSet() fnames, err := gcc.IncludeFiles(pac.From.FullPath()) if err != nil { return err } for _, name := range fnames { for _, file := range pac.XmlDoc.Files { if file.CName() == name { pac.fileIds.Add(file.Id()) break } } } return nil }
func (pac *Package) initFileIds() error { pac.fileIds = NewSSet() fnames, err := gcc.IncludeFiles(pac.From.FullPath()) if err != nil { return err } // if includedFiles failed, at least has one file( builtin) fnames = append(fnames, pac.From.FullPath()) for _, name := range fnames { for _, file := range pac.XmlDoc.Files { if file.CName() == name { pac.fileIds.Add(file.Id()) break } } } return nil }