//===-- COFFDirectiveParser.cpp - JITLink coff directive parser --*- C++ -*===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // MSVC COFF directive parser // //===----------------------------------------------------------------------===// #include "COFFDirectiveParser.h" #include <array> usingnamespacellvm; usingnamespacejitlink; #define DEBUG_TYPE … // Create prefix string literals used in Options.td #define PREFIX … #include "COFFOptions.inc" #undef PREFIX static constexpr const StringLiteral PrefixTable_init[] = … static constexpr const ArrayRef<StringLiteral> PrefixTable(PrefixTable_init, std::size(PrefixTable_init) - 1); // Create table mapping all options defined in COFFOptions.td usingnamespacellvm::opt; static constexpr opt::OptTable::Info infoTable[] = …; class COFFOptTable : public opt::PrecomputedOptTable { … }; static COFFOptTable optTable; Expected<opt::InputArgList> COFFDirectiveParser::parse(StringRef Str) { … }