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