clang 19.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 RewriteIncludes : 1; ///< Preprocess include directives only.
36 LLVM_PREFERRED_TYPE(bool)
37 unsigned RewriteImports : 1; ///< Include contents of transitively-imported modules.
38 LLVM_PREFERRED_TYPE(bool)
39 unsigned MinimizeWhitespace : 1; ///< Ignore whitespace from input.
40 LLVM_PREFERRED_TYPE(bool)
41 unsigned DirectivesOnly : 1; ///< Process directives but do not expand macros.
42 LLVM_PREFERRED_TYPE(bool)
43 unsigned KeepSystemIncludes : 1; ///< Do not expand system headers.
44
45public:
47 ShowCPP = 0;
48 ShowComments = 0;
52 ShowMacros = 0;
59 }
60};
61
62} // end namespace clang
63
64#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 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.