opnsense-src/include/clang/Basic/Version.h

72 lines
2.4 KiB
C
Raw Normal View History

2009-06-02 13:58:47 -04:00
//===- Version.h - Clang Version Number -------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
2009-10-14 14:03:49 -04:00
// This header defines version macros and version-related utility functions
// for Clang.
2009-06-02 13:58:47 -04:00
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_BASIC_VERSION_H
#define LLVM_CLANG_BASIC_VERSION_H
2010-01-23 06:10:26 -05:00
#include "llvm/ADT/StringRef.h"
2009-06-02 13:58:47 -04:00
/// \brief Clang major version
#define CLANG_VERSION_MAJOR 1
2009-10-14 14:03:49 -04:00
// FIXME: Updates to this file must also update CMakeLists.txt and VER.
2009-06-02 13:58:47 -04:00
/// \brief Clang minor version
2009-10-14 14:03:49 -04:00
#define CLANG_VERSION_MINOR 1
/// \brief Clang patchlevel version
// #define CLANG_VERSION_PATCHLEVEL 1
2009-06-02 13:58:47 -04:00
/// \brief Helper macro for CLANG_VERSION_STRING.
#define CLANG_MAKE_VERSION_STRING2(X) #X
2009-10-14 14:03:49 -04:00
#ifdef CLANG_VERSION_PATCHLEVEL
/// \brief Helper macro for CLANG_VERSION_STRING.
#define CLANG_MAKE_VERSION_STRING(X,Y,Z) CLANG_MAKE_VERSION_STRING2(X.Y.Z)
/// \brief A string that describes the Clang version number, e.g.,
/// "1.0".
#define CLANG_VERSION_STRING \
CLANG_MAKE_VERSION_STRING(CLANG_VERSION_MAJOR,CLANG_VERSION_MINOR,CLANG_VERSION_PATCHLEVEL)
#else
2009-06-02 13:58:47 -04:00
/// \brief Helper macro for CLANG_VERSION_STRING.
#define CLANG_MAKE_VERSION_STRING(X,Y) CLANG_MAKE_VERSION_STRING2(X.Y)
/// \brief A string that describes the Clang version number, e.g.,
/// "1.0".
#define CLANG_VERSION_STRING \
CLANG_MAKE_VERSION_STRING(CLANG_VERSION_MAJOR,CLANG_VERSION_MINOR)
2009-10-14 14:03:49 -04:00
#endif
namespace clang {
2010-01-23 06:10:26 -05:00
/// \brief Retrieves the repository path (e.g., Subversion path) that
/// identifies the particular Clang branch, tag, or trunk from which this
/// Clang was built.
llvm::StringRef getClangRepositoryPath();
/// \brief Retrieves the repository revision number (or identifer) from which
/// this Clang was built.
2010-02-16 04:31:36 -05:00
std::string getClangRevision();
2010-01-23 06:10:26 -05:00
/// \brief Retrieves the full repository version that is an amalgamation of
/// the information in getClangRepositoryPath() and getClangRevision().
2010-02-16 04:31:36 -05:00
std::string getClangFullRepositoryVersion();
2009-10-14 14:03:49 -04:00
2010-01-23 06:10:26 -05:00
/// \brief Retrieves a string representing the complete clang version,
/// which includes the clang version number, the repository version,
/// and the vendor tag.
2010-02-16 04:31:36 -05:00
std::string getClangFullVersion();
2009-10-14 14:03:49 -04:00
}
2009-06-02 13:58:47 -04:00
#endif // LLVM_CLANG_BASIC_VERSION_H