Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:51

0001 //===- Version.h - Clang Version Number -------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 ///
0009 /// \file
0010 /// Defines version macros and version-related utility functions
0011 /// for Clang.
0012 ///
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_CLANG_BASIC_VERSION_H
0016 #define LLVM_CLANG_BASIC_VERSION_H
0017 
0018 #include "clang/Basic/Version.inc"
0019 #include "llvm/ADT/StringRef.h"
0020 
0021 namespace clang {
0022   /// Retrieves the repository path (e.g., Subversion path) that
0023   /// identifies the particular Clang branch, tag, or trunk from which this
0024   /// Clang was built.
0025   std::string getClangRepositoryPath();
0026 
0027   /// Retrieves the repository path from which LLVM was built.
0028   ///
0029   /// This supports LLVM residing in a separate repository from clang.
0030   std::string getLLVMRepositoryPath();
0031 
0032   /// Retrieves the repository revision number (or identifier) from which
0033   /// this Clang was built.
0034   std::string getClangRevision();
0035 
0036   /// Retrieves the repository revision number (or identifier) from which
0037   /// LLVM was built.
0038   ///
0039   /// If Clang and LLVM are in the same repository, this returns the same
0040   /// string as getClangRevision.
0041   std::string getLLVMRevision();
0042 
0043   /// Retrieves the Clang vendor tag.
0044   std::string getClangVendor();
0045 
0046   /// Retrieves the full repository version that is an amalgamation of
0047   /// the information in getClangRepositoryPath() and getClangRevision().
0048   std::string getClangFullRepositoryVersion();
0049 
0050   /// Retrieves a string representing the complete clang version,
0051   /// which includes the clang version number, the repository version,
0052   /// and the vendor tag.
0053   std::string getClangFullVersion();
0054 
0055   /// Like getClangFullVersion(), but with a custom tool name.
0056   std::string getClangToolFullVersion(llvm::StringRef ToolName);
0057 
0058   /// Retrieves a string representing the complete clang version suitable
0059   /// for use in the CPP __VERSION__ macro, which includes the clang version
0060   /// number, the repository version, and the vendor tag.
0061   std::string getClangFullCPPVersion();
0062 }
0063 
0064 #endif // LLVM_CLANG_BASIC_VERSION_H