<commit_before>class CodesignRequirement < Requirement
  include FileUtils
  fatal true

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

  def message
    <<-EOS.undent
      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 "http://llvm.org/"

  stable do
    url "http://llvm.org/releases/3.8.1/llvm-3.8.1.src.tar.xz"
    sha256 "6e82ce4adb54ff3afc18053d6981b6aed1406751b8742582ed50f04b5ab475f9"

    resource "clang" do
      url "http://llvm.org/releases/3.8.1/cfe-3.8.1.src.tar.xz"
      sha256 "4cd3836dfb4b88b597e075341cae86d61c63ce3963e45c7fe6a8bf59bb382cdf"
    end

    resource "clang-extra-tools" do
      url "http://llvm.org/releases/3.8.1/clang-tools-extra-3.8.1.src.tar.xz"
      sha256 "664a5c60220de9c290bf2a5b03d902ab731a4f95fe73a00856175ead494ec396"
    end

    resource "compiler-rt" do
      url "http://llvm.org/releases/3.8.1/compiler-rt-3.8.1.src.tar.xz"
      sha256 "0df011dae14d8700499dfc961602ee0a9572fef926202ade5dcdfe7858411e5c"
    end

    # Only required to build & run Compiler-RT tests on OS X, optional otherwise.
    # http://clang.llvm.org/get_started.html
    resource "libcxx" do
      url "http://llvm.org/releases/3.8.1/libcxx-3.8.1.src.tar.xz"
      sha256 "77d7f3784c88096d785bd705fa1bab7031ce184cd91ba8a7008abf55264eeecc"
    end

    resource "libcxxabi" do
      url "http://llvm.org/releases/3.8.1/libcxxabi-3.8.1.src.tar.xz"
      sha256 "e1b55f7be3fad746bdd3025f43e42d429fb6194aac5919c2be17c4a06314dae1"
    end

    resource "libunwind" do
      url "http://llvm.org/releases/3.8.1/libunwind-3.8.1.src.tar.xz"
      sha256 "21e58ce09a5982255ecf86b86359179ddb0be4f8f284a95be14201df90e48453"
    end

    resource "lld" do
      url "http://llvm.org/releases/3.8.1/lld-3.8.1.src.tar.xz"
      sha256 "2bd9be8bb18d82f7f59e31ea33b4e58387dbdef0bc11d5c9fcd5ce9a4b16dc00"
    end

    resource "lldb" do
      url "http://llvm.org/releases/3.8.1/lldb-3.8.1.src.tar.xz"
      sha256 "349148116a47e39dcb5d5042f10d8a6357d2c865034563283ca512f81cdce8a3"
    end

    resource "openmp" do
      url "http://llvm.org/releases/3.8.1/openmp-3.8.1.src.tar.xz"
      sha256 "68fcde6ef34e0275884a2de3450a31e931caf1d6fda8606ef14f89c4123617dc"
    end

    resource "polly" do
      url "http://llvm.org/releases/3.8.1/polly-3.8.1.src.tar.xz"
      sha256 "453c27e1581614bb3b6351bf5a2da2939563ea9d1de99c420f85ca8d87b928a2"
    end
  end

  bottle do
    sha256 "3198e307a4360b428c953cc00408e5b80bd07b4946b96db8bbbfb03f81cb4aa2" => :el_capitan
    sha256 "1957948bbbbee09eac331b2b0bad399b04f94d8c79271ea0aee4ac99ab7e6100" => :yosemite
    sha256 "dba4556fbb273ef07dcc135a32eabb4b2eafb874ceecb9732b2ccaeded965a80" => :mavericks
  end

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

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

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

    resource "compiler-rt" do
      url "http://llvm.org/git/compiler-rt.git"
    end

    resource "libcxx" do
      url "http://llvm.org/git/libcxx.git"
    end

    resource "libcxxabi" do
      url "http://llvm.org/git/libcxxabi.git"
    end

    resource "libunwind" do
      url "git://git.sv.gnu.org/libunwind.git"
    end

    resource "lld" do
      url "http://llvm.org/git/lld.git"
    end

    resource "lldb" do<commit_msg>llvm: update url for HEAD resource libunwind (#3095)<commit_after>class CodesignRequirement < Requirement
  include FileUtils
  fatal true

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

  def message
    <<-EOS.undent
      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 "http://llvm.org/"

  stable do
    url "http://llvm.org/releases/3.8.1/llvm-3.8.1.src.tar.xz"
    sha256 "6e82ce4adb54ff3afc18053d6981b6aed1406751b8742582ed50f04b5ab475f9"

    resource "clang" do
      url "http://llvm.org/releases/3.8.1/cfe-3.8.1.src.tar.xz"
      sha256 "4cd3836dfb4b88b597e075341cae86d61c63ce3963e45c7fe6a8bf59bb382cdf"
    end

    resource "clang-extra-tools" do
      url "http://llvm.org/releases/3.8.1/clang-tools-extra-3.8.1.src.tar.xz"
      sha256 "664a5c60220de9c290bf2a5b03d902ab731a4f95fe73a00856175ead494ec396"
    end

    resource "compiler-rt" do
      url "http://llvm.org/releases/3.8.1/compiler-rt-3.8.1.src.tar.xz"
      sha256 "0df011dae14d8700499dfc961602ee0a9572fef926202ade5dcdfe7858411e5c"
    end

    # Only required to build & run Compiler-RT tests on OS X, optional otherwise.
    # http://clang.llvm.org/get_started.html
    resource "libcxx" do
      url "http://llvm.org/releases/3.8.1/libcxx-3.8.1.src.tar.xz"
      sha256 "77d7f3784c88096d785bd705fa1bab7031ce184cd91ba8a7008abf55264eeecc"
    end

    resource "libcxxabi" do
      url "http://llvm.org/releases/3.8.1/libcxxabi-3.8.1.src.tar.xz"
      sha256 "e1b55f7be3fad746bdd3025f43e42d429fb6194aac5919c2be17c4a06314dae1"
    end

    resource "libunwind" do
      url "http://llvm.org/releases/3.8.1/libunwind-3.8.1.src.tar.xz"
      sha256 "21e58ce09a5982255ecf86b86359179ddb0be4f8f284a95be14201df90e48453"
    end

    resource "lld" do
      url "http://llvm.org/releases/3.8.1/lld-3.8.1.src.tar.xz"
      sha256 "2bd9be8bb18d82f7f59e31ea33b4e58387dbdef0bc11d5c9fcd5ce9a4b16dc00"
    end

    resource "lldb" do
      url "http://llvm.org/releases/3.8.1/lldb-3.8.1.src.tar.xz"
      sha256 "349148116a47e39dcb5d5042f10d8a6357d2c865034563283ca512f81cdce8a3"
    end

    resource "openmp" do
      url "http://llvm.org/releases/3.8.1/openmp-3.8.1.src.tar.xz"
      sha256 "68fcde6ef34e0275884a2de3450a31e931caf1d6fda8606ef14f89c4123617dc"
    end

    resource "polly" do
      url "http://llvm.org/releases/3.8.1/polly-3.8.1.src.tar.xz"
      sha256 "453c27e1581614bb3b6351bf5a2da2939563ea9d1de99c420f85ca8d87b928a2"
    end
  end

  bottle do
    sha256 "3198e307a4360b428c953cc00408e5b80bd07b4946b96db8bbbfb03f81cb4aa2" => :el_capitan
    sha256 "1957948bbbbee09eac331b2b0bad399b04f94d8c79271ea0aee4ac99ab7e6100" => :yosemite
    sha256 "dba4556fbb273ef07dcc135a32eabb4b2eafb874ceecb9732b2ccaeded965a80" => :mavericks
  end

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

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

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

    resource "compiler-rt" do
      url "http://llvm.org/git/compiler-rt.git"
    end

    resource "libcxx" do
      url "http://llvm.org/git/libcxx.git"
    end

    resource "libcxxabi" do
      url "http://llvm.org/git/libcxxabi.git"
    end

    resource "libunwind" do
      url "http://llvm.org/git/libunwind.git"
    end

    resource "lld" do
      url "http://llvm.org/git/lld.git"
    end

    resource "lldb" do
{'fraction_non_alphanumeric': 0.11714285714285715, 'fraction_numerical': 0.1765986394557823, 'mean_word_length': 3.086158977209561, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': 2}}
{'dir': 'git-commits-cleaned', 'id': '1404051', 'n_tokens_mistral': 3938, 'n_tokens_neox': 3230, 'n_words': 428}