LLVM 19.0.0git
COFFDirectiveParser.h
Go to the documentation of this file.
1//===--- COFFDirectiveParser.h - JITLink coff directive parser --*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8//
9// MSVC COFF directive parser
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_JITLINK_COFFDIRECTIVEPARSER_H
14#define LLVM_EXECUTIONENGINE_JITLINK_COFFDIRECTIVEPARSER_H
15
17#include "llvm/Option/Arg.h"
18#include "llvm/Option/ArgList.h"
20#include "llvm/Support/Error.h"
23
24namespace llvm {
25namespace jitlink {
26
27enum {
29#define OPTION(...) LLVM_MAKE_OPT_ID_WITH_ID_PREFIX(COFF_OPT_, __VA_ARGS__),
30#include "COFFOptions.inc"
31#undef OPTION
32};
33
34/// Parser for the MSVC specific preprocessor directives.
35/// https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=msvc-160
37public:
39
40private:
42 llvm::StringSaver saver{bAlloc};
43};
44
45} // end namespace jitlink
46} // end namespace llvm
47
48#endif // LLVM_EXECUTIONENGINE_JITLINK_COFFDIRECTIVEPARSER_H
Defines the llvm::Arg class for parsed arguments.
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:66
Tagged union holding either a T or a Error.
Definition: Error.h:474
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Saves strings in the provided stable storage and returns a StringRef with a stable character pointer.
Definition: StringSaver.h:21
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Definition: regcomp.c:192