summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Core/IncludeStyle.cpp
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2018-05-30 12:09:58 +0000
committerEric Liu <ioeric@google.com>2018-05-30 12:09:58 +0000
commitcfd01f94b2c4f7a9a46e4a93434e0076422f245f (patch)
treee9412acd187f41a0031eabd4d939cea49b1fd244 /clang/lib/Tooling/Core/IncludeStyle.cpp
parent46fdee75e70291e9c2eb00e07f997d05c5b4563d (diff)
downloadbcm5719-llvm-cfd01f94b2c4f7a9a46e4a93434e0076422f245f.tar.gz
bcm5719-llvm-cfd01f94b2c4f7a9a46e4a93434e0076422f245f.zip
Revert "Reland "Move #include manipulation code to new lib/Tooling/Inclusions.""
This reverts commit r333532. Revert for now to fix an internal bot issue. llvm-svn: 333534
Diffstat (limited to 'clang/lib/Tooling/Core/IncludeStyle.cpp')
-rw-r--r--clang/lib/Tooling/Core/IncludeStyle.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/lib/Tooling/Core/IncludeStyle.cpp b/clang/lib/Tooling/Core/IncludeStyle.cpp
new file mode 100644
index 00000000000..74eec481c28
--- /dev/null
+++ b/clang/lib/Tooling/Core/IncludeStyle.cpp
@@ -0,0 +1,32 @@
+//===--- IncludeStyle.cpp - Style of C++ #include directives -----*- C++-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Tooling/Core/IncludeStyle.h"
+
+
+using clang::tooling::IncludeStyle;
+
+namespace llvm {
+namespace yaml {
+
+void MappingTraits<IncludeStyle::IncludeCategory>::mapping(
+ IO &IO, IncludeStyle::IncludeCategory &Category) {
+ IO.mapOptional("Regex", Category.Regex);
+ IO.mapOptional("Priority", Category.Priority);
+}
+
+void ScalarEnumerationTraits<IncludeStyle::IncludeBlocksStyle>::enumeration(
+ IO &IO, IncludeStyle::IncludeBlocksStyle &Value) {
+ IO.enumCase(Value, "Preserve", IncludeStyle::IBS_Preserve);
+ IO.enumCase(Value, "Merge", IncludeStyle::IBS_Merge);
+ IO.enumCase(Value, "Regroup", IncludeStyle::IBS_Regroup);
+}
+
+} // namespace yaml
+} // namespace llvm
OpenPOWER on IntegriCloud