1 //===--- COFFDirectiveParser.h - JITLink coff directive parser --*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // MSVC COFF directive parser
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_EXECUTIONENGINE_JITLINK_COFFDIRECTIVEPARSER_H
14 #define LLVM_EXECUTIONENGINE_JITLINK_COFFDIRECTIVEPARSER_H
16 #include "llvm/ExecutionEngine/JITLink/JITLink.h"
17 #include "llvm/Option/Arg.h"
18 #include "llvm/Option/ArgList.h"
19 #include "llvm/Support/CommandLine.h"
20 #include "llvm/Support/Error.h"
21 #include "llvm/Support/StringSaver.h"
22 #include "llvm/TargetParser/Triple.h"
29 #define OPTION(...) LLVM_MAKE_OPT_ID_WITH_ID_PREFIX(COFF_OPT_, __VA_ARGS__),
30 #include "COFFOptions.inc"
34 /// Parser for the MSVC specific preprocessor directives.
35 /// https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=msvc-160
36 class COFFDirectiveParser
{
38 Expected
<opt::InputArgList
> parse(StringRef Str
);
41 llvm::BumpPtrAllocator bAlloc
;
42 llvm::StringSaver saver
{bAlloc
};
45 } // end namespace jitlink
46 } // end namespace llvm
48 #endif // LLVM_EXECUTIONENGINE_JITLINK_COFFDIRECTIVEPARSER_H