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"
42 LLVM_CONSTRUCT_OPT_INFO_WITH_ID_PREFIX(COFF_OPT_, __VA_ARGS__),
43#include "COFFOptions.inc"
59 bool HasNul = Tok.end() != Str.end() && Tok.data()[Tok.size()] ==
'\0';
63 unsigned missingIndex;
64 unsigned missingCount;
69 return make_error<JITLinkError>(
Twine(
"COFF directive parsing failed: ") +
70 Result.getArgString(missingIndex) +
73 for (
auto *arg : Result.filtered(COFF_OPT_UNKNOWN))
74 dbgs() <<
"Unknown coff option argument: " << arg->getAsString(Result)
77 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.
constexpr 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, Visibility VisibilityMask=Visibility()) const
Parse an list of arguments into an InputArgList.
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.