xref: /netbsd-src/external/apache2/llvm/dist/clang/lib/Tooling/Inclusions/IncludeStyle.cpp (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
17330f729Sjoerg //===--- IncludeStyle.cpp - Style of C++ #include directives -----*- C++-*-===//
27330f729Sjoerg //
37330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
47330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information.
57330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
67330f729Sjoerg //
77330f729Sjoerg //===----------------------------------------------------------------------===//
87330f729Sjoerg 
97330f729Sjoerg #include "clang/Tooling/Inclusions/IncludeStyle.h"
107330f729Sjoerg 
117330f729Sjoerg using clang::tooling::IncludeStyle;
127330f729Sjoerg 
137330f729Sjoerg namespace llvm {
147330f729Sjoerg namespace yaml {
157330f729Sjoerg 
mapping(IO & IO,IncludeStyle::IncludeCategory & Category)167330f729Sjoerg void MappingTraits<IncludeStyle::IncludeCategory>::mapping(
177330f729Sjoerg     IO &IO, IncludeStyle::IncludeCategory &Category) {
187330f729Sjoerg   IO.mapOptional("Regex", Category.Regex);
197330f729Sjoerg   IO.mapOptional("Priority", Category.Priority);
207330f729Sjoerg   IO.mapOptional("SortPriority", Category.SortPriority);
21*e038c9c4Sjoerg   IO.mapOptional("CaseSensitive", Category.RegexIsCaseSensitive);
227330f729Sjoerg }
237330f729Sjoerg 
enumeration(IO & IO,IncludeStyle::IncludeBlocksStyle & Value)247330f729Sjoerg void ScalarEnumerationTraits<IncludeStyle::IncludeBlocksStyle>::enumeration(
257330f729Sjoerg     IO &IO, IncludeStyle::IncludeBlocksStyle &Value) {
267330f729Sjoerg   IO.enumCase(Value, "Preserve", IncludeStyle::IBS_Preserve);
277330f729Sjoerg   IO.enumCase(Value, "Merge", IncludeStyle::IBS_Merge);
287330f729Sjoerg   IO.enumCase(Value, "Regroup", IncludeStyle::IBS_Regroup);
297330f729Sjoerg }
307330f729Sjoerg 
317330f729Sjoerg } // namespace yaml
327330f729Sjoerg } // namespace llvm
33