//===--- COFFModuleDefinition.cpp - Simple DEF parser ---------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Windows-specific. // A parser for the module-definition file (.def file). // // The format of module-definition files are described in this document: // https://msdn.microsoft.com/en-us/library/28d6s79h.aspx // //===----------------------------------------------------------------------===// #include "llvm/Object/COFFModuleDefinition.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Object/COFFImportFile.h" #include "llvm/Object/Error.h" #include "llvm/Support/Error.h" #include "llvm/Support/Path.h" usingnamespacellvm::COFF; usingnamespacellvm; namespace llvm { namespace object { enum Kind { … }; struct Token { … }; static bool isDecorated(StringRef Sym, bool MingwDef) { … } class Lexer { … }; class Parser { … }; Expected<COFFModuleDefinition> parseCOFFModuleDefinition(MemoryBufferRef MB, MachineTypes Machine, bool MingwDef, bool AddUnderscores) { … } } // namespace object } // namespace llvm