• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- PreprocessorExcludedConditionalDirectiveSkipMapping.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_LEX_PREPROCESSOR_EXCLUDED_COND_DIRECTIVE_SKIP_MAPPING_H
10 #define LLVM_CLANG_LEX_PREPROCESSOR_EXCLUDED_COND_DIRECTIVE_SKIP_MAPPING_H
11 
12 #include "clang/Basic/LLVM.h"
13 #include "llvm/ADT/DenseMap.h"
14 #include "llvm/Support/MemoryBuffer.h"
15 
16 namespace clang {
17 
18 /// A mapping from an offset into a buffer to the number of bytes that can be
19 /// skipped by the preprocessor when skipping over excluded conditional
20 /// directive ranges.
21 using PreprocessorSkippedRangeMapping = llvm::DenseMap<unsigned, unsigned>;
22 
23 /// The datastructure that holds the mapping between the active memory buffers
24 /// and the individual skip mappings.
25 using ExcludedPreprocessorDirectiveSkipMapping =
26     llvm::DenseMap<const char *, const PreprocessorSkippedRangeMapping *>;
27 
28 } // end namespace clang
29 
30 #endif // LLVM_CLANG_LEX_PREPROCESSOR_EXCLUDED_COND_DIRECTIVE_SKIP_MAPPING_H
31