"""Provides the repository macro to import LLVM."""

load("//third_party:repo.bzl", "tf_http_archive")

def repo(name):
    """Imports LLVM."""
    LLVM_COMMIT = "18efa420da5fa065d88ba451cdcdbd950a2090c1"
    LLVM_SHA256 = "44b8977a8a49a7a701e09f7963427bc2a6f025a41064ae7249d5631cd47fa244"

    tf_http_archive(
        name = name,
        sha256 = LLVM_SHA256,
        strip_prefix = "llvm-project-{commit}".format(commit = LLVM_COMMIT),
        urls = [
            "https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
            "https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
        ],
        build_file = "//third_party/llvm:llvm.BUILD",
        patch_file = [
            "//third_party/llvm:infer_type.patch",  # TODO(b/231285230): remove once resolved
            "//third_party/llvm:build.patch",
            "//third_party/llvm:macos_build_fix.patch",
        ],
        link_files = {"//third_party/llvm:run_lit.sh": "mlir/run_lit.sh"},
    )

@@ -160,132 +160,132 @@
  = %22
-18efa420da5fa065d88ba451cdcdbd950a2090c1%22%0A    LLVM_SHA256 = %2244b8977a8a49a7a701e09f7963427bc2a6f025a41064ae7249d5631cd47fa24
+31d12df3b9382cd3b1500cb0f11d96291e79c37f%22%0A    LLVM_SHA256 = %2255bf0f5f2519c7e6f6c35a2b21c868dc8c7d2f5f3bd335d4d63481f9ea5a28e
 4%22%0A%0A

Integrate LLVM at llvm/llvm-project@31d12df3b938