<commit_before>//===--- HostInfo.h - Host specific information -----------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef CLANG_DRIVER_HOSTINFO_H_
#define CLANG_DRIVER_HOSTINFO_H_

#include <string>

namespace clang {
namespace driver {
  class ArgList;
  class ToolChain;

/// HostInfo - Config information about a particular host which may
/// interact with driver behavior.
/// 
/// The host information is used for controlling the parts of the
/// driver which interact with the platform the driver is ostensibly
/// being run from. For testing purposes, the HostInfo used by the
/// driver may differ from the actual host.
class HostInfo {
  std::string Arch, Platform, OS;

protected:
  HostInfo(const char *Arch, const char *Platform, const char *OS);

public:
  virtual ~HostInfo();

  /// useDriverDriver - Whether the driver should act as a driver
  /// driver for this host and support -arch, -Xarch, etc.
  virtual bool useDriverDriver() const = 0;

  /// getToolChain - Construct the toolchain to use for this host.
  ///
  /// \param Args - The argument list, which may be used to alter the
  /// default toolchain, for example in the presence of -m32 or -m64.
  ///
  /// \param ArchName - The architecture to return a toolchain for, or
  /// 0 if unspecified. This will only be non-zero for hosts which
  /// support a driver driver.
  virtual ToolChain *getToolChain(const ArgList &Args, 
                                  const char *ArchName) const = 0;
};

/// DarwinHostInfo - Darwin host information implementation.
class DarwinHostInfo : public HostInfo {
  /// Darwin version of host.
  unsigned DarwinVersion[3];

  /// GCC version to use on this host.
  unsigned GCCVersion[3];

public:
  DarwinHostInfo(const char *Arch, const char *Platform, const char *OS);

  virtual bool useDriverDriver() const;<commit_msg>Driver: Add some HostInfo accessors.<commit_after>//===--- HostInfo.h - Host specific information -----------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef CLANG_DRIVER_HOSTINFO_H_
#define CLANG_DRIVER_HOSTINFO_H_

#include <string>

namespace clang {
namespace driver {
  class ArgList;
  class ToolChain;

/// HostInfo - Config information about a particular host which may
/// interact with driver behavior.
/// 
/// The host information is used for controlling the parts of the
/// driver which interact with the platform the driver is ostensibly
/// being run from. For testing purposes, the HostInfo used by the
/// driver may differ from the actual host.
class HostInfo {
  std::string Arch, Platform, OS;

protected:
  HostInfo(const char *Arch, const char *Platform, const char *OS);

public:
  virtual ~HostInfo();

  const std::string &getArchName() const { return Arch; }
  const std::string &getPlatformName() const { return Platform; }
  const std::string &getOSName() const { return OS; }

  /// useDriverDriver - Whether the driver should act as a driver
  /// driver for this host and support -arch, -Xarch, etc.
  virtual bool useDriverDriver() const = 0;

  /// getToolChain - Construct the toolchain to use for this host.
  ///
  /// \param Args - The argument list, which may be used to alter the
  /// default toolchain, for example in the presence of -m32 or -m64.
  ///
  /// \param ArchName - The architecture to return a toolchain for, or
  /// 0 if unspecified. This will only be non-zero for hosts which
  /// support a driver driver.
  virtual ToolChain *getToolChain(const ArgList &Args, 
                                  const char *ArchName) const = 0;
};

/// DarwinHostInfo - Darwin host information implementation.
class DarwinHostInfo : public HostInfo {
  /// Darwin version of host.
  unsigned DarwinVersion[3];

  /// GCC version to use on this host.
  unsigned GCCVersion[3];

public:
  DarwinHostInfo(const char *Arch, const char *Platform, const char *OS);

  virtual bool useDriverDriver() const;
{'fraction_non_alphanumeric': 0.13879981676591846, 'fraction_numerical': 0.004122766834631242, 'mean_word_length': 2.5417680454176805, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1055322', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1119, 'n_words': 499}