IncludeStyle.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  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. #include "clang/Tooling/Core/IncludeStyle.h"
  10. using clang::tooling::IncludeStyle;
  11. namespace llvm {
  12. namespace yaml {
  13. void MappingTraits<IncludeStyle::IncludeCategory>::mapping(
  14. IO &IO, IncludeStyle::IncludeCategory &Category) {
  15. IO.mapOptional("Regex", Category.Regex);
  16. IO.mapOptional("Priority", Category.Priority);
  17. }
  18. void ScalarEnumerationTraits<IncludeStyle::IncludeBlocksStyle>::enumeration(
  19. IO &IO, IncludeStyle::IncludeBlocksStyle &Value) {
  20. IO.enumCase(Value, "Preserve", IncludeStyle::IBS_Preserve);
  21. IO.enumCase(Value, "Merge", IncludeStyle::IBS_Merge);
  22. IO.enumCase(Value, "Regroup", IncludeStyle::IBS_Regroup);
  23. }
  24. } // namespace yaml
  25. } // namespace llvm