1 //===- PreprocessorExcludedConditionalDirectiveSkipMapping.h - --*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LEX_PREPROCESSOR_EXCLUDED_COND_DIRECTIVE_SKIP_MAPPING_H
10 #define LLVM_CLANG_LEX_PREPROCESSOR_EXCLUDED_COND_DIRECTIVE_SKIP_MAPPING_H
12 #include "clang/Basic/LLVM.h"
13 #include "llvm/ADT/DenseMap.h"
14 #include "llvm/Support/MemoryBuffer.h"
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
21 using PreprocessorSkippedRangeMapping = llvm::DenseMap<unsigned, unsigned>;
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 llvm::MemoryBuffer *,
27 const PreprocessorSkippedRangeMapping *>;
29 } // end namespace clang
31 #endif // LLVM_CLANG_LEX_PREPROCESSOR_EXCLUDED_COND_DIRECTIVE_SKIP_MAPPING_H