#include "llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/COFFImportFile.h"
#include "llvm/Object/COFFModuleDefinition.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/Path.h"
#include "llvm/TargetParser/Host.h"
#include <optional>
#include <vector>
usingnamespacellvm;
usingnamespacellvm::object;
usingnamespacellvm::COFF;
namespace {
enum { … };
#define PREFIX …
#include "Options.inc"
#undef PREFIX
usingnamespacellvm::opt;
static constexpr opt::OptTable::Info InfoTable[] = …;
class DllOptTable : public opt::GenericOptTable { … };
std::unique_ptr<MemoryBuffer> openFile(const Twine &Path) { … }
MachineTypes getEmulation(StringRef S) { … }
MachineTypes getMachine(Triple T) { … }
MachineTypes getDefaultMachine() { … }
std::optional<std::string> getPrefix(StringRef Argv0) { … }
bool parseModuleDefinition(StringRef DefFileName, MachineTypes Machine,
bool AddUnderscores,
std::vector<COFFShortExport> &Exports,
std::string &OutputFile) { … }
}
int llvm::dlltoolDriverMain(llvm::ArrayRef<const char *> ArgsArr) { … }