18using namespace jitlink;
20#define DEBUG_TYPE "jitlink"
22#define OPTTABLE_STR_TABLE_CODE
23#include "COFFOptions.inc"
24#undef OPTTABLE_STR_TABLE_CODE
26#define OPTTABLE_PREFIXES_TABLE_CODE
27#include "COFFOptions.inc"
28#undef OPTTABLE_PREFIXES_TABLE_CODE
30#define OPTTABLE_PREFIXES_UNION_CODE
31#include "COFFOptions.inc"
32#undef OPTTABLE_PREFIXES_UNION_CODE
38 LLVM_CONSTRUCT_OPT_INFO_WITH_ID_PREFIX(COFF_OPT_, __VA_ARGS__),
39#include "COFFOptions.inc"
47 OptionPrefixesUnion,
true) {}
57 bool HasNul = Tok.end() != Str.end() && Tok.data()[Tok.size()] ==
'\0';
61 unsigned missingIndex;
62 unsigned missingCount;
67 return make_error<JITLinkError>(
Twine(
"COFF directive parsing failed: ") +
68 Result.getArgString(missingIndex) +
71 for (
auto *arg : Result.filtered(COFF_OPT_UNKNOWN))
72 dbgs() <<
"Unknown coff option argument: " << arg->getAsString(Result)
75 return std::move(Result);
static COFFOptTable optTable
static constexpr opt::OptTable::Info infoTable[]
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.
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.