Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:55

0001 //===--- PreprocessorOutputOptions.h ----------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_CLANG_FRONTEND_PREPROCESSOROUTPUTOPTIONS_H
0010 #define LLVM_CLANG_FRONTEND_PREPROCESSOROUTPUTOPTIONS_H
0011 
0012 #include <llvm/Support/Compiler.h>
0013 
0014 namespace clang {
0015 
0016 /// PreprocessorOutputOptions - Options for controlling the C preprocessor
0017 /// output (e.g., -E).
0018 class PreprocessorOutputOptions {
0019 public:
0020   LLVM_PREFERRED_TYPE(bool)
0021   unsigned ShowCPP : 1;            ///< Print normal preprocessed output.
0022   LLVM_PREFERRED_TYPE(bool)
0023   unsigned ShowComments : 1;       ///< Show comments.
0024   LLVM_PREFERRED_TYPE(bool)
0025   unsigned ShowLineMarkers : 1;    ///< Show \#line markers.
0026   LLVM_PREFERRED_TYPE(bool)
0027   unsigned UseLineDirectives : 1;   ///< Use \#line instead of GCC-style \# N.
0028   LLVM_PREFERRED_TYPE(bool)
0029   unsigned ShowMacroComments : 1;  ///< Show comments, even in macros.
0030   LLVM_PREFERRED_TYPE(bool)
0031   unsigned ShowMacros : 1;         ///< Print macro definitions.
0032   LLVM_PREFERRED_TYPE(bool)
0033   unsigned ShowIncludeDirectives : 1;  ///< Print includes, imports etc. within preprocessed output.
0034   LLVM_PREFERRED_TYPE(bool)
0035   unsigned ShowEmbedDirectives : 1; ///< Print embeds, etc. within preprocessed
0036   LLVM_PREFERRED_TYPE(bool)
0037   unsigned RewriteIncludes : 1;    ///< Preprocess include directives only.
0038   LLVM_PREFERRED_TYPE(bool)
0039   unsigned RewriteImports  : 1;    ///< Include contents of transitively-imported modules.
0040   LLVM_PREFERRED_TYPE(bool)
0041   unsigned MinimizeWhitespace : 1; ///< Ignore whitespace from input.
0042   LLVM_PREFERRED_TYPE(bool)
0043   unsigned DirectivesOnly : 1; ///< Process directives but do not expand macros.
0044   LLVM_PREFERRED_TYPE(bool)
0045   unsigned KeepSystemIncludes : 1; ///< Do not expand system headers.
0046 
0047 public:
0048   PreprocessorOutputOptions() {
0049     ShowCPP = 0;
0050     ShowComments = 0;
0051     ShowLineMarkers = 1;
0052     UseLineDirectives = 0;
0053     ShowMacroComments = 0;
0054     ShowMacros = 0;
0055     ShowIncludeDirectives = 0;
0056     ShowEmbedDirectives = 0;
0057     RewriteIncludes = 0;
0058     RewriteImports = 0;
0059     MinimizeWhitespace = 0;
0060     DirectivesOnly = 0;
0061     KeepSystemIncludes = 0;
0062   }
0063 };
0064 
0065 }  // end namespace clang
0066 
0067 #endif