]> granicus.if.org Git - clang/commitdiff
Move VersionTuple from clang/Basic to llvm/Support
authorPavel Labath <labath@google.com>
Mon, 11 Jun 2018 10:28:04 +0000 (10:28 +0000)
committerPavel Labath <labath@google.com>
Mon, 11 Jun 2018 10:28:04 +0000 (10:28 +0000)
Summary:
This kind of functionality is useful to other project apart from clang.
LLDB works with version numbers a lot, but it does not have a convenient
abstraction for this. Moving this class to a lower level library allows
it to be freely used within LLDB.

Since this class is used in a lot of places in clang, and it used to be
in the clang namespace, it seemed appropriate to add it to the list of
adopted classes in LLVM.h to avoid prefixing all uses with "llvm::".

Also, I didn't find any tests specific for this class, so I wrote a
couple of quick ones for the more interesting bits of functionality.

Reviewers: zturner, erik.pilkington

Subscribers: mgorny, cfe-commits, llvm-commits

Differential Revision: https://reviews.llvm.org/D47887

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334399 91177308-0d34-0410-b5e6-96231b3b80d8

23 files changed:
include/clang/AST/Attr.h
include/clang/AST/Availability.h
include/clang/AST/DeclBase.h
include/clang/AST/ExprObjC.h
include/clang/Basic/AlignedAllocation.h
include/clang/Basic/LLVM.h
include/clang/Basic/ObjCRuntime.h
include/clang/Basic/TargetInfo.h
include/clang/Basic/VersionTuple.h [deleted file]
include/clang/Driver/ToolChain.h
include/clang/Parse/Parser.h
include/clang/Sema/AttributeList.h
include/clang/Serialization/ASTReader.h
include/clang/Serialization/ASTWriter.h
lib/AST/DeclBase.cpp
lib/Basic/CMakeLists.txt
lib/Basic/ObjCRuntime.cpp
lib/Basic/VersionTuple.cpp [deleted file]
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains/Cuda.h
lib/Frontend/CompilerInvocation.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp

index 390e840b330c8c49f25a65c0e7bbaae675c8f1a3..32a61c59d236833be1fe4e35f59a8343c4529b9b 100644 (file)
@@ -23,9 +23,9 @@
 #include "clang/Basic/OpenMPKinds.h"
 #include "clang/Basic/Sanitizers.h"
 #include "clang/Basic/SourceLocation.h"
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/VersionTuple.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 #include <cassert>
index e1f5671b8c592f2349c3ba82f3078c66d451760f..28f3c3c01d200012b0a8c662d026bca7414f4370 100644 (file)
@@ -15,8 +15,8 @@
 #define LLVM_CLANG_AST_AVAILABILITY_H
 
 #include "clang/Basic/SourceLocation.h"
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/VersionTuple.h"
 
 namespace clang {
 
index ae7cd4d10db087f4bd2c785a21a1d14a6d6f1964..229e7cd839b5d035a34ccca6eb639b98ceddd528 100644 (file)
@@ -19,7 +19,6 @@
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/Specifiers.h"
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/PointerIntPair.h"
 #include "llvm/ADT/PointerUnion.h"
@@ -28,6 +27,7 @@
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/PrettyStackTrace.h"
+#include "llvm/Support/VersionTuple.h"
 #include <algorithm>
 #include <cassert>
 #include <cstddef>
index 361aa48cb2830ea59c32b8749401772aebbce080..5dac0e037da11c251805236bcb275b8c986da5bc 100644 (file)
@@ -25,7 +25,6 @@
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/Specifiers.h"
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/None.h"
 #include "llvm/ADT/Optional.h"
@@ -36,6 +35,7 @@
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/TrailingObjects.h"
+#include "llvm/Support/VersionTuple.h"
 #include "llvm/Support/type_traits.h"
 #include <cassert>
 #include <cstddef>
index 853f8dad25e4db165e797c43eeb6c944df48bc75..a84d22dda81a6ecb39971cc07e9f87fce3a9b1d2 100644 (file)
@@ -16,9 +16,9 @@
 #ifndef LLVM_CLANG_BASIC_ALIGNED_ALLOCATION_H
 #define LLVM_CLANG_BASIC_ALIGNED_ALLOCATION_H
 
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/VersionTuple.h"
 
 namespace clang {
 
index 885fba6afb701c4338a764fb75ce04a472184668..8a432db911dafb818a8bde280f6d74bb103ccf4e 100644 (file)
@@ -28,6 +28,7 @@ namespace llvm {
   // ADT's.
   class StringRef;
   class Twine;
+  class VersionTuple;
   template<typename T> class ArrayRef;
   template<typename T> class MutableArrayRef;
   template<typename T> class OwningArrayRef;
@@ -60,17 +61,18 @@ namespace clang {
   using llvm::cast_or_null;
   
   // ADT's.
-  using llvm::None;
-  using llvm::Optional;
-  using llvm::StringRef;
-  using llvm::Twine;
   using llvm::ArrayRef;
   using llvm::MutableArrayRef;
+  using llvm::None;
+  using llvm::Optional;
   using llvm::OwningArrayRef;
+  using llvm::SaveAndRestore;
   using llvm::SmallString;
   using llvm::SmallVector;
   using llvm::SmallVectorImpl;
-  using llvm::SaveAndRestore;
+  using llvm::StringRef;
+  using llvm::Twine;
+  using llvm::VersionTuple;
 
   // Error handling.
   using llvm::Expected;
index bc51574cf34ee246f284c07cb29718c5d43eab47..d5f4f50fe36f5ae2343103960d0c9ee06fdf0f2b 100644 (file)
 #define LLVM_CLANG_BASIC_OBJCRUNTIME_H
 
 #include "clang/Basic/LLVM.h"
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/VersionTuple.h"
 #include <string>
 
 namespace clang {
index 08e33f58f55999874404ce5d9cc2222dadddea48..c5a187e6f8050d8837664f922c919956a0404374 100644 (file)
@@ -20,7 +20,6 @@
 #include "clang/Basic/Specifiers.h"
 #include "clang/Basic/TargetCXXABI.h"
 #include "clang/Basic/TargetOptions.h"
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/Optional.h"
@@ -30,6 +29,7 @@
 #include "llvm/ADT/Triple.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/Support/DataTypes.h"
+#include "llvm/Support/VersionTuple.h"
 #include <cassert>
 #include <string>
 #include <vector>
diff --git a/include/clang/Basic/VersionTuple.h b/include/clang/Basic/VersionTuple.h
deleted file mode 100644 (file)
index e7385b0..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-//===- VersionTuple.h - Version Number Handling -----------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Defines the clang::VersionTuple class, which represents a version in
-/// the form major[.minor[.subminor]].
-///
-//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_BASIC_VERSIONTUPLE_H
-#define LLVM_CLANG_BASIC_VERSIONTUPLE_H
-
-#include "clang/Basic/LLVM.h"
-#include "llvm/ADT/Optional.h"
-#include <string>
-#include <tuple>
-
-namespace clang {
-
-/// Represents a version number in the form major[.minor[.subminor[.build]]].
-class VersionTuple {
-  unsigned Major : 32;
-
-  unsigned Minor : 31;
-  unsigned HasMinor : 1;
-
-  unsigned Subminor : 31;
-  unsigned HasSubminor : 1;
-
-  unsigned Build : 31;
-  unsigned HasBuild : 1;
-
-public:
-  VersionTuple()
-      : Major(0), Minor(0), HasMinor(false), Subminor(0), HasSubminor(false),
-        Build(0), HasBuild(false) {}
-
-  explicit VersionTuple(unsigned Major)
-      : Major(Major), Minor(0), HasMinor(false), Subminor(0),
-        HasSubminor(false), Build(0), HasBuild(false) {}
-
-  explicit VersionTuple(unsigned Major, unsigned Minor)
-      : Major(Major), Minor(Minor), HasMinor(true), Subminor(0),
-        HasSubminor(false), Build(0), HasBuild(false) {}
-
-  explicit VersionTuple(unsigned Major, unsigned Minor, unsigned Subminor)
-      : Major(Major), Minor(Minor), HasMinor(true), Subminor(Subminor),
-        HasSubminor(true), Build(0), HasBuild(false) {}
-
-  explicit VersionTuple(unsigned Major, unsigned Minor, unsigned Subminor,
-                        unsigned Build)
-      : Major(Major), Minor(Minor), HasMinor(true), Subminor(Subminor),
-        HasSubminor(true), Build(Build), HasBuild(true) {}
-
-  /// Determine whether this version information is empty
-  /// (e.g., all version components are zero).
-  bool empty() const {
-    return Major == 0 && Minor == 0 && Subminor == 0 && Build == 0;
-  }
-
-  /// Retrieve the major version number.
-  unsigned getMajor() const { return Major; }
-
-  /// Retrieve the minor version number, if provided.
-  Optional<unsigned> getMinor() const {
-    if (!HasMinor)
-      return None;
-    return Minor;
-  }
-
-  /// Retrieve the subminor version number, if provided.
-  Optional<unsigned> getSubminor() const {
-    if (!HasSubminor)
-      return None;
-    return Subminor;
-  }
-
-  /// Retrieve the build version number, if provided.
-  Optional<unsigned> getBuild() const {
-    if (!HasBuild)
-      return None;
-    return Build;
-  }
-  
-  /// Determine if two version numbers are equivalent. If not
-  /// provided, minor and subminor version numbers are considered to be zero.
-  friend bool operator==(const VersionTuple& X, const VersionTuple &Y) {
-    return X.Major == Y.Major && X.Minor == Y.Minor &&
-           X.Subminor == Y.Subminor && X.Build == Y.Build;
-  }
-
-  /// Determine if two version numbers are not equivalent.
-  ///
-  /// If not provided, minor and subminor version numbers are considered to be 
-  /// zero.
-  friend bool operator!=(const VersionTuple &X, const VersionTuple &Y) {
-    return !(X == Y);
-  }
-
-  /// Determine whether one version number precedes another.
-  ///
-  /// If not provided, minor and subminor version numbers are considered to be
-  /// zero.
-  friend bool operator<(const VersionTuple &X, const VersionTuple &Y) {
-    return std::tie(X.Major, X.Minor, X.Subminor, X.Build) <
-           std::tie(Y.Major, Y.Minor, Y.Subminor, Y.Build);
-  }
-
-  /// Determine whether one version number follows another.
-  ///
-  /// If not provided, minor and subminor version numbers are considered to be
-  /// zero.
-  friend bool operator>(const VersionTuple &X, const VersionTuple &Y) {
-    return Y < X;
-  }
-
-  /// Determine whether one version number precedes or is
-  /// equivalent to another. 
-  ///
-  /// If not provided, minor and subminor version numbers are considered to be
-  /// zero.
-  friend bool operator<=(const VersionTuple &X, const VersionTuple &Y) {
-    return !(Y < X);
-  }
-
-  /// Determine whether one version number follows or is
-  /// equivalent to another.
-  ///
-  /// If not provided, minor and subminor version numbers are considered to be
-  /// zero.
-  friend bool operator>=(const VersionTuple &X, const VersionTuple &Y) {
-    return !(X < Y);
-  }
-
-  /// Retrieve a string representation of the version number.
-  std::string getAsString() const;
-
-  /// Try to parse the given string as a version number.
-  /// \returns \c true if the string does not match the regular expression
-  ///   [0-9]+(\.[0-9]+){0,3}
-  bool tryParse(StringRef string);
-};
-
-/// Print a version number.
-raw_ostream& operator<<(raw_ostream &Out, const VersionTuple &V);
-
-} // end namespace clang
-#endif // LLVM_CLANG_BASIC_VERSIONTUPLE_H
index f94a210bd9abebca7685700985e174d847abf161..addf7aa6a9c8d3a0b7bf9df7a661999d0bd4233a 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/Sanitizers.h"
-#include "clang/Basic/VersionTuple.h"
 #include "clang/Driver/Action.h"
 #include "clang/Driver/Multilib.h"
 #include "clang/Driver/Types.h"
@@ -22,6 +21,7 @@
 #include "llvm/ADT/Triple.h"
 #include "llvm/MC/MCTargetOptions.h"
 #include "llvm/Option/Option.h"
+#include "llvm/Support/VersionTuple.h"
 #include "llvm/Target/TargetOptions.h"
 #include <cassert>
 #include <memory>
index 49d6182cd2dee2056dd68d5cf9ca63967f27b394..6e911230b28a46f974d2f6b5459d1996dce4de9d 100644 (file)
@@ -45,7 +45,6 @@ namespace clang {
   class ColonProtectionRAIIObject;
   class InMessageExpressionRAIIObject;
   class PoisonSEHIdentifiersRAIIObject;
-  class VersionTuple;
   class OMPClause;
   class ObjCTypeParamList;
   class ObjCTypeParameter;
index 03761501805512105e3375418821952bdffc2102..dd15b7a2f56ea2bd0e364c9d6a97b7fd9db71d23 100644 (file)
 #include "clang/Basic/AttrSubjectMatchRules.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/TargetInfo.h"
-#include "clang/Basic/VersionTuple.h"
 #include "clang/Sema/Ownership.h"
 #include "llvm/ADT/PointerUnion.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Allocator.h"
+#include "llvm/Support/VersionTuple.h"
 #include <cassert>
 #include <cstddef>
 #include <cstring>
index d9e9174b7483c3add5efad525b74fac3b815e404..7de511ad617afcd75114dcd907f2b3cd1b64ca25 100644 (file)
@@ -28,7 +28,6 @@
 #include "clang/Basic/OpenCLOptions.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/Version.h"
-#include "clang/Basic/VersionTuple.h"
 #include "clang/Lex/ExternalPreprocessorSource.h"
 #include "clang/Lex/HeaderSearch.h"
 #include "clang/Lex/PreprocessingRecord.h"
@@ -62,6 +61,7 @@
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Timer.h"
+#include "llvm/Support/VersionTuple.h"
 #include <cassert>
 #include <cstddef>
 #include <cstdint>
index 9d4a3f9cf5849c9c03e9a98757829886b84d9dc5..28db00df899386b4c9d5a51f78379128dce64670 100644 (file)
@@ -93,7 +93,6 @@ class SwitchCase;
 class TemplateParameterList;
 class Token;
 class TypeSourceInfo;
-class VersionTuple;
 
 /// Writes an AST file containing the contents of a translation unit.
 ///
index 3db886957c02ca466a828fcf3d15edc41aac6153..7b7febdc41031bbebe1af4612c69783db22fc29f 100644 (file)
@@ -34,7 +34,6 @@
 #include "clang/Basic/PartialDiagnostic.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/TargetInfo.h"
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/PointerIntPair.h"
 #include "llvm/ADT/SmallVector.h"
@@ -42,6 +41,7 @@
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MathExtras.h"
+#include "llvm/Support/VersionTuple.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 #include <cassert>
index 2e394916b52ccd310ab783070bba396621a831b7..e82f451dea170a99a93daf9b08dc66f90f2bc98e 100644 (file)
@@ -93,7 +93,6 @@ add_clang_library(clangBasic
   Targets/XCore.cpp
   TokenKinds.cpp
   Version.cpp
-  VersionTuple.cpp
   VirtualFileSystem.cpp
   Warnings.cpp
   XRayInstr.cpp
index 15f38d1156a49120cea4dd1b329b17a336a4bed7..8fa0afbe03f2f8e52e0b35f601596cd666b26834 100644 (file)
@@ -13,8 +13,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Basic/ObjCRuntime.h"
-#include "clang/Basic/VersionTuple.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/VersionTuple.h"
 #include "llvm/Support/raw_ostream.h"
 #include <cstddef>
 #include <string>
diff --git a/lib/Basic/VersionTuple.cpp b/lib/Basic/VersionTuple.cpp
deleted file mode 100644 (file)
index 7a9176a..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-//===- VersionTuple.cpp - Version Number Handling ---------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the VersionTuple class, which represents a version in
-// the form major[.minor[.subminor]].
-//
-//===----------------------------------------------------------------------===//
-#include "clang/Basic/VersionTuple.h"
-#include "llvm/Support/raw_ostream.h"
-
-using namespace clang;
-
-std::string VersionTuple::getAsString() const {
-  std::string Result;
-  {
-    llvm::raw_string_ostream Out(Result);
-    Out << *this;
-  }
-  return Result;
-}
-
-raw_ostream& clang::operator<<(raw_ostream &Out, 
-                                     const VersionTuple &V) {
-  Out << V.getMajor();
-  if (Optional<unsigned> Minor = V.getMinor())
-    Out << '.' << *Minor;
-  if (Optional<unsigned> Subminor = V.getSubminor())
-    Out << '.' << *Subminor;
-  if (Optional<unsigned> Build = V.getBuild())
-    Out << '.' << *Build;
-  return Out;
-}
-
-static bool parseInt(StringRef &input, unsigned &value) {
-  assert(value == 0);
-  if (input.empty()) return true;
-
-  char next = input[0];
-  input = input.substr(1);
-  if (next < '0' || next > '9') return true;
-  value = (unsigned) (next - '0');
-
-  while (!input.empty()) {
-    next = input[0];
-    if (next < '0' || next > '9') return false;
-    input = input.substr(1);
-    value = value * 10 + (unsigned) (next - '0');
-  }
-
-  return false;
-}
-
-bool VersionTuple::tryParse(StringRef input) {
-  unsigned major = 0, minor = 0, micro = 0, build = 0;
-
-  // Parse the major version, [0-9]+
-  if (parseInt(input, major)) return true;
-
-  if (input.empty()) {
-    *this = VersionTuple(major);
-    return false;
-  }
-
-  // If we're not done, parse the minor version, \.[0-9]+
-  if (input[0] != '.') return true;
-  input = input.substr(1);
-  if (parseInt(input, minor)) return true;
-
-  if (input.empty()) {
-    *this = VersionTuple(major, minor);
-    return false;
-  }
-
-  // If we're not done, parse the micro version, \.[0-9]+
-  if (input[0] != '.') return true;
-  input = input.substr(1);
-  if (parseInt(input, micro)) return true;
-
-  if (input.empty()) {
-    *this = VersionTuple(major, minor, micro);
-    return false;
-  }
-
-  // If we're not done, parse the micro version, \.[0-9]+
-  if (input[0] != '.') return true;
-  input = input.substr(1);
-  if (parseInt(input, build)) return true;
-
-  // If we have characters left over, it's an error.
-  if (!input.empty()) return true;
-
-  *this = VersionTuple(major, minor, micro, build);
-  return false;
-}
index a3799ac613810f2bcb5db36a19b5f2ad43fa5b29..a56a03805414ce94152345dfdf6722948375ebc7 100644 (file)
@@ -13,7 +13,6 @@
 #include "ToolChains/Clang.h"
 #include "clang/Basic/ObjCRuntime.h"
 #include "clang/Basic/Sanitizers.h"
-#include "clang/Basic/VersionTuple.h"
 #include "clang/Basic/VirtualFileSystem.h"
 #include "clang/Config/config.h"
 #include "clang/Driver/Action.h"
@@ -29,6 +28,7 @@
 #include "llvm/ADT/Triple.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/Config/llvm-config.h"
+#include "llvm/MC/MCTargetOptions.h"
 #include "llvm/Option/Arg.h"
 #include "llvm/Option/ArgList.h"
 #include "llvm/Option/OptTable.h"
@@ -36,9 +36,9 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
-#include "llvm/MC/MCTargetOptions.h"
 #include "llvm/Support/TargetParser.h"
 #include "llvm/Support/TargetRegistry.h"
+#include "llvm/Support/VersionTuple.h"
 #include <cassert>
 #include <cstddef>
 #include <cstring>
index 057eb220c2abb5e9d641f1112e546100a5928f9b..99d5a4a628ceff3bdeaf78df32b93508bf12f9ab 100644 (file)
 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CUDA_H
 
 #include "clang/Basic/Cuda.h"
-#include "clang/Basic/VersionTuple.h"
 #include "clang/Driver/Action.h"
 #include "clang/Driver/Multilib.h"
-#include "clang/Driver/ToolChain.h"
 #include "clang/Driver/Tool.h"
+#include "clang/Driver/ToolChain.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm/Support/VersionTuple.h"
 #include <set>
 #include <vector>
 
index b10155da96c29bc6a44d8b34f95eda634ff373e3..a959cdb2347ad3dac3f50041c4502524972807a2 100644 (file)
@@ -23,7 +23,6 @@
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/TargetOptions.h"
 #include "clang/Basic/Version.h"
-#include "clang/Basic/VersionTuple.h"
 #include "clang/Basic/VirtualFileSystem.h"
 #include "clang/Basic/Visibility.h"
 #include "clang/Basic/XRayInstr.h"
@@ -76,6 +75,7 @@
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/Regex.h"
+#include "llvm/Support/VersionTuple.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetOptions.h"
 #include <algorithm>
index 4dd79720270219cc58245973a794919a3977ea95..89dff67446a21b0fb30bd956878cadf54918249f 100644 (file)
@@ -61,7 +61,6 @@
 #include "clang/Basic/TargetOptions.h"
 #include "clang/Basic/TokenKinds.h"
 #include "clang/Basic/Version.h"
-#include "clang/Basic/VersionTuple.h"
 #include "clang/Frontend/PCHContainerOperations.h"
 #include "clang/Lex/HeaderSearch.h"
 #include "clang/Lex/HeaderSearchOptions.h"
 #include "llvm/ADT/iterator_range.h"
 #include "llvm/Bitcode/BitstreamReader.h"
 #include "llvm/Support/Casting.h"
-#include "llvm/Support/Compression.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm/Support/Compression.h"
 #include "llvm/Support/DJB.h"
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/Error.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/SaveAndRestore.h"
 #include "llvm/Support/Timer.h"
+#include "llvm/Support/VersionTuple.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 #include <cassert>
index c1f552e536a081672d005b6b3167b9266038b695..1e3a098b09e9f18c75175ff291b101a575ba7857 100644 (file)
@@ -53,7 +53,6 @@
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Basic/TargetOptions.h"
 #include "clang/Basic/Version.h"
-#include "clang/Basic/VersionTuple.h"
 #include "clang/Lex/HeaderSearch.h"
 #include "clang/Lex/HeaderSearchOptions.h"
 #include "clang/Lex/MacroInfo.h"
@@ -97,6 +96,7 @@
 #include "llvm/Support/OnDiskHashTable.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/SHA1.h"
+#include "llvm/Support/VersionTuple.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 #include <cassert>