- name: "LLVM 11 repository"
  apt_repository:
    repo: deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-11 main
    filename: llvm11
    state: present

- name: "LLVM 11 (& tools) {{ llvm11_state }}"
  apt:
    default_release: llvm-toolchain-bullseye-11
    pkg:
      - llvm-11
      - llvm-11-dev
      - llvm-11-doc
      - llvm-11-examples
      - llvm-11-runtime
      - clang-11
      - clang-tools-11
      - clang-11-doc
      - libclang-common-11-dev
      - libclang-11-dev
      - libclang1-11
      - clang-format-11
      - clangd-11
      - libfuzzer-11-dev
      - lldb-11
      - lld-11
      - libllvm11
      - libc++-11-dev
      - libc++abi-11-dev
      - python3-lldb-11
      - libclang-cpp11
    state: "{{ llvm11_state }}"

- name: "LLVM 12 repository"
  apt_repository:
    repo: deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-12 main
    filename: llvm12
    state: present

- name: "LLVM 12 (& tools) {{ llvm12_state }}"
  apt:
    default_release: llvm-toolchain-bullseye-12
    pkg:
      - libllvm12
      - llvm-12
      - llvm-12-dev
      - llvm-12-doc
      - llvm-12-examples
      - llvm-12-runtime
      - clang-12
      - clang-tools-12
      - clang-12-doc
      - libclang-common-12-dev
      - libclang-12-dev
      - libclang1-12
      - clang-format-12
      - clangd-12
      - libfuzzer-12-dev
      - lldb-12
      - lld-12
      - libc++-12-dev
      - libc++abi-12-dev
      - libclc-12-dev
      # note: libunwind is not installed as it can conflict with system one
    state: "{{ llvm12_state }}"

- name: "LLVM 13 repository"
  apt_repository:
    repo: deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main
    filename: llvm13
    state: absent

# - name: "LLVM 13 (& tools) {{ llvm13_state }}"
#   apt:
#     default_release: llvm-toolchain-bullseye-13
#     pkg:
#       - libllvm13
#       - llvm-13
#       - llvm-13-dev
#       - llvm-13-doc
#       - llvm-13-examples
#       - llvm-13-runtime
#       - clang-13
#       - clang-tools-13
#       - clang-13-doc
#       - libclang-common-13-dev
#       - libclang-13-dev
#       - libclang1-13
#       - clang-format-13
#       - clangd-13
#       - libfuzzer-13-dev
#       - lldb-13
#       - lld-13
#       - libc++-13-dev
#       - libc++abi-13-dev
#       - libclc-13-dev
#       # note: libunwind is not installed as it can conflict with system one
#     state: "{{ llvm13_state }}"
