<commit_before>class CodesignRequirement < Requirement
  fatal true

  satisfy(:build_env => false) do
    mktemp do
      FileUtils.cp "/usr/bin/false", "llvm_check"
      quiet_system "/usr/bin/codesign", "-f", "-s", "lldb_codesign", "--dryrun", "llvm_check"
    end
  end

  def message
    <<~EOS
      lldb_codesign identity must be available to build with LLDB.
      See: https://llvm.org/svn/llvm-project/lldb/trunk/docs/code-signing.txt
    EOS
  end
end

class Llvm < Formula
  desc "Next-gen compiler infrastructure"
  homepage "https://llvm.org/"
  revision 1 unless OS.mac?

  stable do
    url "https://releases.llvm.org/7.0.0/llvm-7.0.0.src.tar.xz"
    sha256 "8bc1f844e6cbde1b652c19c1edebc1864456fd9c78b8c1bea038e51b363fe222"

    resource "clang" do
      url "https://releases.llvm.org/7.0.0/cfe-7.0.0.src.tar.xz"
      sha256 "550212711c752697d2f82c648714a7221b1207fd9441543ff4aa9e3be45bba55"
    end

    resource "clang-extra-tools" do
      url "https://releases.llvm.org/7.0.0/clang-tools-extra-7.0.0.src.tar.xz"
      sha256 "937c5a8c8c43bc185e4805144744799e524059cac877a44d9063926cd7a19dbe"
    end

    resource "compiler-rt" do
      url "https://releases.llvm.org/7.0.0/compiler-rt-7.0.0.src.tar.xz"
      sha256 "bdec7fe3cf2c85f55656c07dfb0bd93ae46f2b3dd8f33ff3ad6e7586f4c670d6"
    end

    resource "libcxx" do
      url "https://releases.llvm.org/7.0.0/libcxx-7.0.0.src.tar.xz"
      sha256 "9b342625ba2f4e65b52764ab2061e116c0337db2179c6bce7f9a0d70c52134f0"
    end

    resource "libcxxabi" do
      url "https://llvm.org/releases/6.0.1/libcxxabi-6.0.1.src.tar.xz"
      sha256 "209f2ec244a8945c891f722e9eda7c54a5a7048401abd62c62199f3064db385f"
    end

    resource "libunwind" do
      url "https://releases.llvm.org/7.0.0/libunwind-7.0.0.src.tar.xz"
      sha256 "50aee87717421e70450f1e093c6cd9a27f2b111025e1e08d64d5ace36e338a9c"
    end

    resource "lld" do
      url "https://releases.llvm.org/7.0.0/lld-7.0.0.src.tar.xz"
      sha256 "fbcf47c5e543f4cdac6bb9bbbc6327ff24217cd7eafc5571549ad6d237287f9c"
    end

    resource "lldb" do
      url "https://releases.llvm.org/7.0.0/lldb-7.0.0.src.tar.xz"
      sha256 "7ff6d8fee49977d25b3b69be7d22937b92592c7609cf283ed0dcf9e5cd80aa32"
    end

    resource "openmp" do
      url "https://releases.llvm.org/7.0.0/openmp-7.0.0.src.tar.xz"
      sha256 "30662b632f5556c59ee9215c1309f61de50b3ea8e89dcc28ba9a9494bba238ff"
    end

    resource "polly" do
      url "https://releases.llvm.org/7.0.0/polly-7.0.0.src.tar.xz"
      sha256 "919810d3249f4ae79d084746b9527367df18412f30fe039addbf941861c8534b"
    end
  end

  bottle do
    cellar :any
    rebuild 1
    sha256 "17a4de5a32411a11bc449fdf7cef73c1de6c9936085df73e840ad1dadfbe907b" => :mojave
    sha256 "c595bdab01a4fdbdf7c86c61737b2d3bf0b529ecf7a98298827b7edc9e723335" => :high_sierra
    sha256 "b3835b962a53e522634ac67960d5a0a6e221998539eef3158090849b786d1f6e" => :sierra
    sha256 "b0afc0d6a628eed90274ec79fd9b2602ed1c1ca2402e539dfbdafc6907671dc8" => :el_capitan
  end

  # Clang cannot find system headers if Xcode CLT is not installed
  pour_bottle? do
    reason "The bottle needs the Xcode CLT to be installed."
    satisfy { MacOS::CLT.installed? }
  end if OS.mac?

  head do
    url "https://git.llvm.org/git/llvm.git"

    resource "clang" do
      url "https://git.llvm.org/git/clang.git"
    end

    resource "clang-extra-tools" do
      url "https://git.llvm.org/git/clang-tools-extra.git"
    end
<commit_msg>llvm: update 7.0.0_1 bottle for Linuxbrew.<commit_after>class CodesignRequirement < Requirement
  fatal true

  satisfy(:build_env => false) do
    mktemp do
      FileUtils.cp "/usr/bin/false", "llvm_check"
      quiet_system "/usr/bin/codesign", "-f", "-s", "lldb_codesign", "--dryrun", "llvm_check"
    end
  end

  def message
    <<~EOS
      lldb_codesign identity must be available to build with LLDB.
      See: https://llvm.org/svn/llvm-project/lldb/trunk/docs/code-signing.txt
    EOS
  end
end

class Llvm < Formula
  desc "Next-gen compiler infrastructure"
  homepage "https://llvm.org/"
  revision 1 unless OS.mac?

  stable do
    url "https://releases.llvm.org/7.0.0/llvm-7.0.0.src.tar.xz"
    sha256 "8bc1f844e6cbde1b652c19c1edebc1864456fd9c78b8c1bea038e51b363fe222"

    resource "clang" do
      url "https://releases.llvm.org/7.0.0/cfe-7.0.0.src.tar.xz"
      sha256 "550212711c752697d2f82c648714a7221b1207fd9441543ff4aa9e3be45bba55"
    end

    resource "clang-extra-tools" do
      url "https://releases.llvm.org/7.0.0/clang-tools-extra-7.0.0.src.tar.xz"
      sha256 "937c5a8c8c43bc185e4805144744799e524059cac877a44d9063926cd7a19dbe"
    end

    resource "compiler-rt" do
      url "https://releases.llvm.org/7.0.0/compiler-rt-7.0.0.src.tar.xz"
      sha256 "bdec7fe3cf2c85f55656c07dfb0bd93ae46f2b3dd8f33ff3ad6e7586f4c670d6"
    end

    resource "libcxx" do
      url "https://releases.llvm.org/7.0.0/libcxx-7.0.0.src.tar.xz"
      sha256 "9b342625ba2f4e65b52764ab2061e116c0337db2179c6bce7f9a0d70c52134f0"
    end

    resource "libcxxabi" do
      url "https://llvm.org/releases/6.0.1/libcxxabi-6.0.1.src.tar.xz"
      sha256 "209f2ec244a8945c891f722e9eda7c54a5a7048401abd62c62199f3064db385f"
    end

    resource "libunwind" do
      url "https://releases.llvm.org/7.0.0/libunwind-7.0.0.src.tar.xz"
      sha256 "50aee87717421e70450f1e093c6cd9a27f2b111025e1e08d64d5ace36e338a9c"
    end

    resource "lld" do
      url "https://releases.llvm.org/7.0.0/lld-7.0.0.src.tar.xz"
      sha256 "fbcf47c5e543f4cdac6bb9bbbc6327ff24217cd7eafc5571549ad6d237287f9c"
    end

    resource "lldb" do
      url "https://releases.llvm.org/7.0.0/lldb-7.0.0.src.tar.xz"
      sha256 "7ff6d8fee49977d25b3b69be7d22937b92592c7609cf283ed0dcf9e5cd80aa32"
    end

    resource "openmp" do
      url "https://releases.llvm.org/7.0.0/openmp-7.0.0.src.tar.xz"
      sha256 "30662b632f5556c59ee9215c1309f61de50b3ea8e89dcc28ba9a9494bba238ff"
    end

    resource "polly" do
      url "https://releases.llvm.org/7.0.0/polly-7.0.0.src.tar.xz"
      sha256 "919810d3249f4ae79d084746b9527367df18412f30fe039addbf941861c8534b"
    end
  end

  bottle do
    cellar :any
    rebuild 1
    sha256 "17a4de5a32411a11bc449fdf7cef73c1de6c9936085df73e840ad1dadfbe907b" => :mojave
    sha256 "c595bdab01a4fdbdf7c86c61737b2d3bf0b529ecf7a98298827b7edc9e723335" => :high_sierra
    sha256 "b3835b962a53e522634ac67960d5a0a6e221998539eef3158090849b786d1f6e" => :sierra
    sha256 "b0afc0d6a628eed90274ec79fd9b2602ed1c1ca2402e539dfbdafc6907671dc8" => :el_capitan
    sha256 "891458b638541410123c9f0b4931777acb125abe235f3992e3583c42e0150045" => :x86_64_linux
  end

  # Clang cannot find system headers if Xcode CLT is not installed
  pour_bottle? do
    reason "The bottle needs the Xcode CLT to be installed."
    satisfy { MacOS::CLT.installed? }
  end if OS.mac?

  head do
    url "https://git.llvm.org/git/llvm.git"

    resource "clang" do
      url "https://git.llvm.org/git/clang.git"
    end

    resource "clang-extra-tools" do
      url "https://git.llvm.org/git/clang-tools-extra.git"
    end

{'fraction_non_alphanumeric': 0.10907801418439717, 'fraction_numerical': 0.21092198581560284, 'mean_word_length': 3.3986275733000624, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 32, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5125248', 'n_tokens_mistral': 3954, 'n_tokens_neox': 3185, 'n_words': 414}