//===- VersionTuple.cpp - Version Number Handling ---------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file implements the VersionTuple class, which represents a version in // the form major[.minor[.subminor]]. // //===----------------------------------------------------------------------===// #include "llvm/Support/VersionTuple.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/raw_ostream.h" #include <cassert> usingnamespacellvm; std::string VersionTuple::getAsString() const { … } raw_ostream &llvm::operator<<(raw_ostream &Out, const VersionTuple &V) { … } static bool parseInt(StringRef &input, unsigned &value) { … } bool VersionTuple::tryParse(StringRef input) { … }