18using namespace jitlink;
20#define DEBUG_TYPE "jitlink"
23#define PREFIX(NAME, VALUE) \
24 static constexpr StringLiteral NAME##_init[] = VALUE; \
25 static constexpr ArrayRef<StringLiteral> NAME(NAME##_init, \
26 std::size(NAME##_init) - 1);
27#include "COFFOptions.inc"
31#define PREFIX_UNION(VALUES) VALUES
32#include "COFFOptions.inc"
40#define OPTION(X1, X2, ID, KIND, GROUP, ALIAS, X7, X8, X9, X10, X11, X12) \
46 opt::Option::KIND##Class, \
53#include "COFFOptions.inc"
69 bool HasNul = Tok.end() != Str.end() && Tok.data()[Tok.size()] ==
'\0';
73 unsigned missingIndex;
74 unsigned missingCount;
79 return make_error<JITLinkError>(
Twine(
"COFF directive parsing failed: ") +
80 Result.getArgString(missingIndex) +
83 for (
auto *arg : Result.filtered(COFF_OPT_UNKNOWN))
84 dbgs() <<
"Unknown coff option argument: " << arg->getAsString(Result)
87 return std::move(Result);
static constexpr const ArrayRef< StringLiteral > PrefixTable(PrefixTable_init, std::size(PrefixTable_init) - 1)
static COFFOptTable optTable
static constexpr const StringLiteral PrefixTable_init[]
static constexpr opt::OptTable::Info infoTable[]
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Tagged union holding either a T or a Error.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
StringRef - Represent a constant reference to a string, i.e.
const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
StringRef save(const char *S)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Expected< opt::InputArgList > parse(StringRef Str)
InputArgList ParseArgs(ArrayRef< const char * > Args, unsigned &MissingArgIndex, unsigned &MissingArgCount, unsigned FlagsToInclude=0, unsigned FlagsToExclude=0) const
Parse an list of arguments into an InputArgList.
PrecomputedOptTable(ArrayRef< Info > OptionInfos, ArrayRef< StringLiteral > PrefixesTable, bool IgnoreCase=false)
void TokenizeWindowsCommandLineNoCopy(StringRef Source, StringSaver &Saver, SmallVectorImpl< StringRef > &NewArgv)
Tokenizes a Windows command line while attempting to avoid copies.
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Entry for a single option instance in the option data table.