32 #define OPTION(_1, _2, ID, _4, _5, _6, _7, _8, _9, _10, _11, _12) OPT_##ID, 33 #include "Options.inc" 37 #define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE; 38 #include "Options.inc" 42 #define OPTION(X1, X2, ID, KIND, GROUP, ALIAS, X7, X8, X9, X10, X11, X12) \ 43 {X1, X2, X10, X11, OPT_##ID, llvm::opt::Option::KIND##Class, \ 44 X9, X8, OPT_##GROUP, OPT_##ALIAS, X7, X12}, 45 #include "Options.inc" 51 DllOptTable() : OptTable(InfoTable,
false) {}
60 if (std::error_code EC = MB.
getError()) {
61 llvm::errs() <<
"cannot open file " << Path <<
": " << EC.message() <<
"\n";
65 return std::move(*MB);
79 unsigned MissingIndex;
80 unsigned MissingCount;
82 Table.ParseArgs(ArgsArr.
slice(1), MissingIndex, MissingCount);
91 Table.PrintHelp(
outs(),
"llvm-dlltool [options] file...",
"llvm-dlltool",
93 llvm::outs() <<
"\nTARGETS: i386, i386:x86-64, arm, arm64\n";
98 llvm::errs() <<
"error: no target machine specified\n" 99 <<
"supported targets: i386, i386:x86-64, arm, arm64\n";
104 llvm::errs() <<
"ignoring unknown argument: " <<
Arg->getAsString(Args)
107 if (!Args.
hasArg(OPT_d)) {
108 llvm::errs() <<
"no definition file specified\n";
112 std::unique_ptr<MemoryBuffer> MB =
117 if (!MB->getBufferSize()) {
142 Def->OutputFile =
Arg->getValue();
144 if (Def->OutputFile.empty()) {
Represents either an error or a value T.
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
This class represents lattice values for constants.
std::string Name
The name of the export as specified in the .def file or on the command line, i.e. ...
iterator_range< filtered_iterator< sizeof...(OptSpecifiers)> > filtered(OptSpecifiers ...Ids) const
Error takeError()
Take ownership of the stored error.
StringSwitch & Case(StringLiteral S, T Value)
Expected< COFFModuleDefinition > parseCOFFModuleDefinition(MemoryBufferRef MB, COFF::MachineTypes Machine, bool MingwDef=false)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
int dlltoolDriverMain(ArrayRef< const char *> ArgsArr)
LLVM_NODISCARD R Default(T Value)
Tagged union holding either a T or a Error.
Error writeImportLibrary(StringRef ImportName, StringRef Path, ArrayRef< COFFShortExport > Exports, COFF::MachineTypes Machine, bool MinGW)
bool hasArg(OptSpecifiers ...Ids) const
std::string AliasTarget
Creates a weak alias.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
COFF::MachineTypes Machine
raw_ostream & outs()
This returns a reference to a raw_ostream for standard output.
bool hasArgNoClaim(OptSpecifiers ...Ids) const
hasArg - Does the arg list contain any option matching Id.
A switch()-like statement whose cases are string literals.
Provide access to the Option info table.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
std::error_code getError() const
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
Arg * getLastArg(OptSpecifiers ...Ids) const
Return the last argument matching Id, or null.
std::string ExtName
The external, exported name.
Defines the llvm::Arg class for parsed arguments.
ArrayRef< T > slice(size_t N, size_t M) const
slice(n, m) - Chop off the first N elements of the array, and keep M elements in the array...
StringRef getLastArgValue(OptSpecifier Id, StringRef Default="") const
getLastArgValue - Return the value of the last argument, or a default.
std::string SymbolName
The real, mangled symbol name from the object file.
Entry for a single option instance in the option data table.
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFile(const Twine &Filename, int64_t FileSize=-1, bool RequiresNullTerminator=true, bool IsVolatile=false)
Open the specified file as a MemoryBuffer, returning a new MemoryBuffer if successful, otherwise returning null.
StringRef - Represent a constant reference to a string, i.e.
const char * getValue(unsigned N=0) const
std::error_code errorToErrorCode(Error Err)
Helper for converting an ECError to a std::error_code.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.