Go to the documentation of this file.
35 #define OPTION(_1, _2, ID, _4, _5, _6, _7, _8, _9, _10, _11, _12) OPT_##ID,
36 #include "Options.inc"
40 #define PREFIX(NAME, VALUE) const char *const NAME[] = VALUE;
41 #include "Options.inc"
45 #define OPTION(X1, X2, ID, KIND, GROUP, ALIAS, X7, X8, X9, X10, X11, X12) \
46 {X1, X2, X10, X11, OPT_##ID, llvm::opt::Option::KIND##Class, \
47 X9, X8, OPT_##GROUP, OPT_##ALIAS, X7, X12},
48 #include "Options.inc"
54 DllOptTable() : OptTable(InfoTable,
false) {}
61 if (std::error_code EC = MB.
getError()) {
79 switch (
T.getArch()) {
102 ProgName = ProgName.
rtrim(
"0123456789.-");
107 return ProgName.
str();
114 unsigned MissingIndex;
115 unsigned MissingCount;
117 Table.ParseArgs(ArgsArr.
slice(1), MissingIndex, MissingCount);
119 llvm::errs() <<
Args.getArgString(MissingIndex) <<
": missing argument\n";
124 if (
Args.hasArgNoClaim(OPT_INPUT) ||
125 (!
Args.hasArgNoClaim(OPT_d) && !
Args.hasArgNoClaim(OPT_l))) {
126 Table.printHelp(
outs(),
"llvm-dlltool [options] file...",
"llvm-dlltool",
128 llvm::outs() <<
"\nTARGETS: i386, i386:x86-64, arm, arm64\n";
132 for (
auto *
Arg :
Args.filtered(OPT_UNKNOWN))
136 if (!
Args.hasArg(OPT_d)) {
137 llvm::errs() <<
"no definition file specified\n";
141 std::unique_ptr<MemoryBuffer> MB =
146 if (!MB->getBufferSize()) {
157 if (
auto *
Arg =
Args.getLastArg(OPT_m))
175 if (
auto *
Arg =
Args.getLastArg(OPT_D))
176 Def->OutputFile =
Arg->getValue();
178 if (
Def->OutputFile.empty()) {
183 std::string Path = std::string(
Args.getLastArgValue(OPT_l));
191 if (!
E.ExtName.empty()) {
199 if (!
E.AliasTarget.empty() || (!
E.Name.empty() &&
E.Name[0] ==
'?'))
201 E.SymbolName =
E.Name;
207 E.Name =
E.Name.substr(0,
E.Name.find(
'@', 1));
StringSwitch & Case(StringLiteral S, T Value)
Provide access to the Option info table.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_NODISCARD StringRef rtrim(char Char) const
Return string with consecutive Char characters starting from the right removed.
LLVM_NODISCARD R Default(T Value)
@ IMAGE_FILE_MACHINE_AMD64
@ IMAGE_FILE_MACHINE_UNKNOWN
Triple - Helper class for working with autoconf configuration names.
@ IMAGE_FILE_MACHINE_ARMNT
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
Tagged union holding either a T or a Error.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
static ErrorOr< std::unique_ptr< MemoryBuffer > > getFile(const Twine &Filename, bool IsText=false, bool RequiresNullTerminator=true, bool IsVolatile=false)
Open the specified file as a MemoryBuffer, returning a new MemoryBuffer if successful,...
@ IMAGE_FILE_MACHINE_I386
raw_fd_ostream & outs()
This returns a reference to a raw_fd_ostream for standard output.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
std::error_code getError() const
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
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.
std::error_code openFile(const Twine &Name, int &ResultFD, CreationDisposition Disp, FileAccess Access, OpenFlags Flags, unsigned Mode=0666)
Opens a file with the specified creation disposition, access mode, and flags and returns a file descr...
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Error writeImportLibrary(StringRef ImportName, StringRef Path, ArrayRef< COFFShortExport > Exports, COFF::MachineTypes Machine, bool MinGW)
int dlltoolDriverMain(ArrayRef< const char * > ArgsArr)
std::string getDefaultTargetTriple()
getDefaultTargetTriple() - Return the default target triple the compiler has been configured to produ...
StringRef - Represent a constant reference to a string, i.e.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
@ IMAGE_FILE_MACHINE_ARM64
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
std::error_code errorToErrorCode(Error Err)
Helper for converting an ECError to a std::error_code.
COFF::MachineTypes Machine
Represents either an error or a value T.
Entry for a single option instance in the option data table.
A switch()-like statement whose cases are string literals.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
bool consume_back_insensitive(StringRef Suffix)
Returns true if this StringRef has the given suffix, ignoring case, and removes that suffix.
Expected< COFFModuleDefinition > parseCOFFModuleDefinition(MemoryBufferRef MB, COFF::MachineTypes Machine, bool MingwDef=false)
StringRef stem(StringRef path, Style style=Style::native)
Get stem.