Esempio n. 1
0
        public bool ParseLibraries()
        {
            foreach (var library in Options.Libraries)
            {
                if (this.Symbols.Libraries.Any(l => l.FileName == library))
                {
                    continue;
                }

                var parser = new ClangParser();
                parser.LibraryParsed += OnFileParsed;

                using (var res = parser.ParseLibrary(library, Options))
                {
                    if (res.Kind != ParserResultKind.Success)
                    {
                        continue;
                    }

                    Symbols.Libraries.Add(ClangParser.ConvertLibrary(res.Library));

                    res.Library.Dispose();
                }
            }

            return(true);
        }
Esempio n. 2
0
        public bool ParseLibraries()
        {
            ClangParser.LibraryParsed += OnFileParsed;
            foreach (Module module in Options.Modules)
            {
                using var linkerOptions = new LinkerOptions(Context.LinkerOptions);
                foreach (string libraryDir in module.LibraryDirs)
                {
                    linkerOptions.AddLibraryDirs(libraryDir);
                }

                foreach (string library in module.Libraries)
                {
                    if (!Context.Symbols.Libraries.Any(( NativeLibrary l ) => l.FileName == library))
                    {
                        linkerOptions.AddLibraries(library);
                    }
                }

                using ParserResult parserResult = ClangParser.ParseLibrary(linkerOptions);
                if (parserResult.Kind == ParserResultKind.Success)
                {
                    for (uint num = 0u; num < parserResult.LibrariesCount; num++)
                    {
                        Context.Symbols.Libraries.Add(ClangParser.ConvertLibrary(parserResult.GetLibraries(num)));
                    }
                }
            }

            ClangParser.LibraryParsed -= OnFileParsed;
            Context.Symbols.IndexSymbols();
            SortModulesByDependencies();
            return(true);
        }
Esempio n. 3
0
        public ParserResult ParseLibrary(string file)
        {
            var parserOptions = new ParserOptions
            {
                Library      = Library,
                FileName     = file,
                Verbose      = false,
                LibraryDirs  = options.LibraryDirs,
                ToolSetToUse = options.ToolsetToUse
            };

            var result = ClangParser.ParseLibrary(parserOptions);

            OnLibraryParsed(file, result);

            return(result);
        }
Esempio n. 4
0
        public bool ParseLibraries()
        {
            foreach (var library in Options.Libraries)
            {
                var parser = new ClangParser();
                parser.LibraryParsed += OnFileParsed;

                var res = parser.ParseLibrary(library, Options);

                if (res.Kind != ParserResultKind.Success)
                {
                    continue;
                }

                Symbols.Libraries.Add(ClangParser.ConvertLibrary(res.Library));
            }

            return(true);
        }
Esempio n. 5
0
        public bool ParseLibraries()
        {
            ClangParser.LibraryParsed += OnFileParsed;
            foreach (var module in Options.Modules)
            {
                using (var linkerOptions = new LinkerOptions())
                {
                    foreach (var libraryDir in module.LibraryDirs)
                    {
                        linkerOptions.AddLibraryDirs(libraryDir);
                    }

                    foreach (string library in module.Libraries)
                    {
                        if (Context.Symbols.Libraries.Any(l => l.FileName == library))
                        {
                            continue;
                        }
                        linkerOptions.AddLibraries(library);
                    }

                    using (var res = ClangParser.ParseLibrary(linkerOptions))
                    {
                        if (res.Kind != ParserResultKind.Success)
                        {
                            continue;
                        }

                        for (uint i = 0; i < res.LibrariesCount; i++)
                        {
                            Context.Symbols.Libraries.Add(ClangParser.ConvertLibrary(res.GetLibraries(i)));
                        }
                    }
                }
            }
            ClangParser.LibraryParsed -= OnFileParsed;

            Context.Symbols.IndexSymbols();
            SortModulesByDependencies();

            return(true);
        }
Esempio n. 6
0
        public bool ParseLibraries()
        {
            foreach (var module in Options.Modules)
            {
                foreach (var libraryDir in module.LibraryDirs)
                {
                    ParserOptions.AddLibraryDirs(libraryDir);
                }

                foreach (var library in module.Libraries)
                {
                    if (Context.Symbols.Libraries.Any(l => l.FileName == library))
                    {
                        continue;
                    }

                    var parser = new ClangParser();
                    parser.LibraryParsed += OnFileParsed;

                    using (var res = parser.ParseLibrary(library, ParserOptions))
                    {
                        if (res.Kind != ParserResultKind.Success)
                        {
                            continue;
                        }

                        Context.Symbols.Libraries.Add(ClangParser.ConvertLibrary(res.Library));

                        res.Library.Dispose();
                    }
                }
            }

            Context.Symbols.IndexSymbols();
            SortModulesByDependencies();

            return(true);
        }
Esempio n. 7
0
        public bool ParseLibraries()
        {
            foreach (var library in Options.Libraries)
            {
                if (this.Symbols.Libraries.Any(l => l.FileName == library))
                    continue;

                var parser = new ClangParser();
                parser.LibraryParsed += OnFileParsed;

                var res = parser.ParseLibrary(library, Options);

                if (res.Kind != ParserResultKind.Success)
                    continue;

                Symbols.Libraries.Add(ClangParser.ConvertLibrary(res.Library));
            }

            return true;
        }
Esempio n. 8
0
        public bool ParseLibraries()
        {
            foreach (var module in Options.Modules)
            {
                foreach (var libraryDir in module.LibraryDirs)
                    Options.addLibraryDirs(libraryDir);

                foreach (var library in module.Libraries)
                {
                    if (Symbols.Libraries.Any(l => l.FileName == library))
                        continue;

                    var parser = new ClangParser();
                    parser.LibraryParsed += OnFileParsed;

                    using (var res = parser.ParseLibrary(library, Options))
                    {
                        if (res.Kind != ParserResultKind.Success)
                            continue;

                        Symbols.Libraries.Add(ClangParser.ConvertLibrary(res.Library));

                        res.Library.Dispose();
                    }
                }
            }

            return true;
        }
Esempio n. 9
0
        public bool ParseLibraries()
        {
            foreach (var library in Options.Libraries)
            {
                var parser = new ClangParser();
                parser.LibraryParsed += OnFileParsed;

                var res = parser.ParseLibrary(library, Options);

                if (res.Kind != ParserResultKind.Success)
                    continue;

            #if !OLD_PARSER
                Symbols.Libraries.Add(ClangParser.ConvertLibrary(res.Library));
            #else
                Symbols.Libraries.Add(res.Library);
            #endif
            }

            return true;
        }