xref: /openbsd-src/gnu/llvm/clang/lib/Tooling/Inclusions/IncludeStyle.cpp (revision a9ac8606c53d55cee9c3a39778b249c51df111ef)
1e5dd7070Spatrick //===--- IncludeStyle.cpp - Style of C++ #include directives -----*- C++-*-===//
2e5dd7070Spatrick //
3e5dd7070Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4e5dd7070Spatrick // See https://llvm.org/LICENSE.txt for license information.
5e5dd7070Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e5dd7070Spatrick //
7e5dd7070Spatrick //===----------------------------------------------------------------------===//
8e5dd7070Spatrick 
9e5dd7070Spatrick #include "clang/Tooling/Inclusions/IncludeStyle.h"
10e5dd7070Spatrick 
11e5dd7070Spatrick using clang::tooling::IncludeStyle;
12e5dd7070Spatrick 
13e5dd7070Spatrick namespace llvm {
14e5dd7070Spatrick namespace yaml {
15e5dd7070Spatrick 
mapping(IO & IO,IncludeStyle::IncludeCategory & Category)16e5dd7070Spatrick void MappingTraits<IncludeStyle::IncludeCategory>::mapping(
17e5dd7070Spatrick     IO &IO, IncludeStyle::IncludeCategory &Category) {
18e5dd7070Spatrick   IO.mapOptional("Regex", Category.Regex);
19e5dd7070Spatrick   IO.mapOptional("Priority", Category.Priority);
20e5dd7070Spatrick   IO.mapOptional("SortPriority", Category.SortPriority);
21*a9ac8606Spatrick   IO.mapOptional("CaseSensitive", Category.RegexIsCaseSensitive);
22e5dd7070Spatrick }
23e5dd7070Spatrick 
enumeration(IO & IO,IncludeStyle::IncludeBlocksStyle & Value)24e5dd7070Spatrick void ScalarEnumerationTraits<IncludeStyle::IncludeBlocksStyle>::enumeration(
25e5dd7070Spatrick     IO &IO, IncludeStyle::IncludeBlocksStyle &Value) {
26e5dd7070Spatrick   IO.enumCase(Value, "Preserve", IncludeStyle::IBS_Preserve);
27e5dd7070Spatrick   IO.enumCase(Value, "Merge", IncludeStyle::IBS_Merge);
28e5dd7070Spatrick   IO.enumCase(Value, "Regroup", IncludeStyle::IBS_Regroup);
29e5dd7070Spatrick }
30e5dd7070Spatrick 
31e5dd7070Spatrick } // namespace yaml
32e5dd7070Spatrick } // namespace llvm
33