[all-commits] [llvm/llvm-project] cb5b25: [llvm-c] Added a C-API binding to query the LLVM v...

Wenzel Jakob via All-commits all-commits at lists.llvm.org
Wed Dec 7 02:18:51 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb5b25c587833317fd0bb93daf702f4c47048fb1
      https://github.com/llvm/llvm-project/commit/cb5b25c587833317fd0bb93daf702f4c47048fb1
  Author: Wenzel Jakob <wenzel.jakob at epfl.ch>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M llvm/include/llvm-c/Core.h
    M llvm/lib/IR/Core.cpp
    M llvm/unittests/IR/CMakeLists.txt
    A llvm/unittests/IR/CoreBindings.cpp

  Log Message:
  -----------
  [llvm-c] Added a C-API binding to query the LLVM version

The LLVM C bindings currently offer no way to query the version string
dynamically. This is a useful feature in situations where a program
isn't compiled against a specific version of LLVM but rather loads it
dynamically (e.g. using dlopen()).

In situations where the shared library filename doesn't reveal the
version (e.g. LLVM-C.dll) and to adapt to version-specific API
differences, it is then useful to be able to query the version string by
calling the proposed LLVMGetVersion function.

Differential Revision: https://reviews.llvm.org/D139381




More information about the All-commits mailing list