public NativeLibrary FindOrCreateLibrary(string file) { var library = Libraries.Find(m => m.FileName.Equals(file)); if (library == null) { library = new NativeLibrary(file); Libraries.Add(library); } return library; }
public static AST.NativeLibrary ConvertLibrary(NativeLibrary library) { var newLibrary = new AST.NativeLibrary { FileName = library.FileName, ArchType = (ArchType)library.ArchType }; for (int i = 0; i < library.SymbolsCount; ++i) { var symbol = library.GetSymbols(i); newLibrary.Symbols.Add(symbol); } for (int i = 0; i < library.DependenciesCount; i++) { newLibrary.Dependencies.Add(library.GetDependencies(i)); } return(newLibrary); }
public bool FindLibraryBySymbol(string symbol, out NativeLibrary library) { return Symbols.TryGetValue(symbol, out library); }
public static AST.NativeLibrary ConvertLibrary(NativeLibrary library) { var newLibrary = new AST.NativeLibrary { FileName = library.FileName }; foreach (var symbol in library.Symbols) newLibrary.Symbols.Add(symbol); return newLibrary; }
public bool FindLibraryBySymbol(string symbol, out NativeLibrary library) { return(Symbols.TryGetValue(symbol, out library)); }
public bool FindLibraryBySymbol(string symbol, out NativeLibrary library) => Symbols.TryGetValue(symbol, out library) || Symbols.TryGetValue("_" + symbol, out library) || Symbols.TryGetValue(symbol.TrimStart('_'), out library) || Symbols.TryGetValue("_imp_" + symbol, out library) || Symbols.TryGetValue("__imp_" + symbol, out library);