1 //===--- IncludeStyle.cpp - Style of C++ #include directives -----*- C++-*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "clang/Tooling/Inclusions/IncludeStyle.h"
11
12 using clang::tooling::IncludeStyle;
13
14 namespace llvm {
15 namespace yaml {
16
mapping(IO & IO,IncludeStyle::IncludeCategory & Category)17 void MappingTraits<IncludeStyle::IncludeCategory>::mapping(
18 IO &IO, IncludeStyle::IncludeCategory &Category) {
19 IO.mapOptional("Regex", Category.Regex);
20 IO.mapOptional("Priority", Category.Priority);
21 }
22
enumeration(IO & IO,IncludeStyle::IncludeBlocksStyle & Value)23 void ScalarEnumerationTraits<IncludeStyle::IncludeBlocksStyle>::enumeration(
24 IO &IO, IncludeStyle::IncludeBlocksStyle &Value) {
25 IO.enumCase(Value, "Preserve", IncludeStyle::IBS_Preserve);
26 IO.enumCase(Value, "Merge", IncludeStyle::IBS_Merge);
27 IO.enumCase(Value, "Regroup", IncludeStyle::IBS_Regroup);
28 }
29
30 } // namespace yaml
31 } // namespace llvm
32