18#define DEBUG_TYPE "jitlink"
22#include "COFFOptions.inc"
36 bool HasNul = Tok.end() != Str.end() && Tok.data()[Tok.size()] ==
'\0';
37 Buffer.
push_back(HasNul ? Tok.data() : saver.save(Tok).data());
40 unsigned missingIndex;
41 unsigned missingCount;
43 auto Result =
optTable.ParseArgs(Buffer, missingIndex, missingCount);
47 Result.getArgString(missingIndex) +
50 for (
auto *arg : Result.filtered(COFF_OPT_UNKNOWN))
51 dbgs() <<
"Unknown coff option argument: " << arg->getAsString(Result)
54 return std::move(Result);
static COFFOptTable optTable
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.
Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Expected< opt::InputArgList > parse(StringRef Str)
Provide access to the Option info table.
LLVM_ABI 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.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.