clang 20.0.0git
PreprocessorOutputOptions.h
Go to the documentation of this file.
1//===--- PreprocessorOutputOptions.h ----------------------------*- 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#ifndef LLVM_CLANG_FRONTEND_PREPROCESSOROUTPUTOPTIONS_H
10#define LLVM_CLANG_FRONTEND_PREPROCESSOROUTPUTOPTIONS_H
11
12#include <llvm/Support/Compiler.h>
13
14namespace clang {
15
16/// PreprocessorOutputOptions - Options for controlling the C preprocessor
17/// output (e.g., -E).
19public:
20 LLVM_PREFERRED_TYPE(bool)
21 unsigned ShowCPP : 1; ///< Print normal preprocessed output.
22 LLVM_PREFERRED_TYPE(bool)
23 unsigned ShowComments : 1; ///< Show comments.
24 LLVM_PREFERRED_TYPE(bool)
25 unsigned ShowLineMarkers : 1; ///< Show \#line markers.
26 LLVM_PREFERRED_TYPE(bool)
27 unsigned UseLineDirectives : 1; ///< Use \#line instead of GCC-style \# N.
28 LLVM_PREFERRED_TYPE(bool)
29 unsigned ShowMacroComments : 1; ///< Show comments, even in macros.
30 LLVM_PREFERRED_TYPE(bool)
31 unsigned ShowMacros : 1; ///< Print macro definitions.
32 LLVM_PREFERRED_TYPE(bool)
33 unsigned ShowIncludeDirectives : 1; ///< Print includes, imports etc. within preprocessed output.
34 LLVM_PREFERRED_TYPE(bool)
35 unsigned ShowEmbedDirectives : 1; ///< Print embeds, etc. within preprocessed
36 LLVM_PREFERRED_TYPE(bool)
37 unsigned RewriteIncludes : 1; ///< Preprocess include directives only.
38 LLVM_PREFERRED_TYPE(bool)
39 unsigned RewriteImports : 1; ///< Include contents of transitively-imported modules.
40 LLVM_PREFERRED_TYPE(bool)
41 unsigned MinimizeWhitespace : 1; ///< Ignore whitespace from input.
42 LLVM_PREFERRED_TYPE(bool)
43 unsigned DirectivesOnly : 1; ///< Process directives but do not expand macros.
44 LLVM_PREFERRED_TYPE(bool)
45 unsigned KeepSystemIncludes : 1; ///< Do not expand system headers.
46
47public:
49 ShowCPP = 0;
50 ShowComments = 0;
54 ShowMacros = 0;
62 }
63};
64
65} // end namespace clang
66
67#endif
PreprocessorOutputOptions - Options for controlling the C preprocessor output (e.g....
unsigned UseLineDirectives
Use #line instead of GCC-style # N.
unsigned ShowMacros
Print macro definitions.
unsigned ShowIncludeDirectives
Print includes, imports etc. within preprocessed output.
unsigned ShowMacroComments
Show comments, even in macros.
unsigned ShowCPP
Print normal preprocessed output.
unsigned MinimizeWhitespace
Ignore whitespace from input.
unsigned KeepSystemIncludes
Do not expand system headers.
unsigned ShowEmbedDirectives
Print embeds, etc. within preprocessed.
unsigned ShowLineMarkers
Show #line markers.
unsigned RewriteIncludes
Preprocess include directives only.
unsigned DirectivesOnly
Process directives but do not expand macros.
unsigned RewriteImports
Include contents of transitively-imported modules.
The JSON file list parser is used to communicate input to InstallAPI.