LLVM-Demangle
Python bindings for the LLVM Demangle library, with vendored LLVM source.
Exposes Itanium, Microsoft, Rust, and D language demanglers, plus ItaniumPartialDemangler for querying individual symbol components. Ships all LLVM versions 11–21 in a single package with runtime version selection. No system LLVM installation required.
Install
pip install llvm-demangle-fxti
Quick start
import llvmdemangle
llvmdemangle.demangle("_Z3fooi") # 'foo(int)'
llvmdemangle.demangle("?foo@@YAHH@Z") # 'int __cdecl foo(int)'
Version selection
By default, the highest available LLVM version (21) is used. Use backend() to get a specific version:
import llvmdemangle
# Default (LLVM 21)
llvmdemangle.demangle("_Z3fooi")
# Use a specific LLVM version
v18 = llvmdemangle.backend(18)
v18.demangle("_Z3fooi")
v18.ItaniumPartialDemangler("_ZN3Foo3barEid")
v18.LLVM_VERSION # 18
# See what's available
llvmdemangle.SUPPORTED_VERSIONS # [11, 12, 13, ..., 21]
API reference
LLVM_VERSION
Integer constant indicating the LLVM version of the default backend (e.g. 21).
SUPPORTED_VERSIONS
List of all available LLVM backend versions (e.g. [11, 12, ..., 21]).
backend(llvm_version) -> module
Return the backend module for a specific LLVM version. The returned module has the same API as the top-level llvmdemangle module.
demangle(name) -> str
Auto-detect mangling scheme and demangle. Returns the original string if unrecognized.
llvmdemangle.demangle("_Z3fooi") # 'foo(int)'
llvmdemangle.demangle("?foo@@YAHH@Z") # 'int __cdecl foo(int)'
llvmdemangle.demangle("plain") # 'plain'
itanium_demangle(name, *, parse_params=True) -> str | None
Demangle an Itanium C++ ABI symbol. Returns None on failure.
parse_params=False omits function parameters (LLVM >= 18; ignored on older versions).
llvmdemangle.itanium_demangle("_Z3fooi") # 'foo(int)'
llvmdemangle.itanium_demangle("_Z3fooi", parse_params=False) # 'foo' (LLVM 18+)
microsoft_demangle(name, *, flags=0) -> tuple[str, int] | None
Demangle a Microsoft Visual C++ symbol. Returns (demangled_name, n_read) or None.
llvmdemangle.microsoft_demangle("?foo@@YAHH@Z")
# ('int __cdecl foo(int)', 12)
llvmdemangle.microsoft_demangle("?foo@@YAHH@Z", flags=llvmdemangle.MSDF_NO_CALLING_CONVENTION)
# ('int foo(int)', 12)
Flag constants:
| Constant | Value | Description |
|---|---|---|
MSDF_NONE |
0 | No flags |
MSDF_DUMP_BACKREFS |
1 | Dump back-references |
MSDF_NO_ACCESS_SPECIFIER |
2 | Omit access specifiers |
MSDF_NO_CALLING_CONVENTION |
4 | Omit calling convention |
MSDF_NO_RETURN_TYPE |
8 | Omit return type |
MSDF_NO_MEMBER_TYPE |
16 | Omit member type |
MSDF_NO_VARIABLE_TYPE |
32 | Omit variable type (LLVM >= 14) |
rust_demangle(name) -> str | None
Demangle a Rust v0 symbol. Returns None on failure. Requires LLVM >= 13.
llvmdemangle.rust_demangle("_RNvC8my_crate3foo") # 'my_crate::foo'
dlang_demangle(name) -> str | None
Demangle a D language symbol. Returns None on failure. Requires LLVM >= 14.
llvmdemangle.dlang_demangle("_Dmain") # 'D main'
non_microsoft_demangle(name, *, can_have_leading_dot=True, parse_params=True) -> str | None
Demangle a non-Microsoft symbol (Itanium, Rust, or D). Returns None on failure. Requires LLVM >= 14. parse_params requires LLVM >= 18.
get_arm64ec_insertion_point(name) -> int | None
Get the Arm64EC insertion point in a mangled name. Requires LLVM >= 19.
ItaniumPartialDemangler(name)
Parse Itanium C++ symbols into an AST and query individual components. Raises ValueError if the name cannot be parsed.
d = llvmdemangle.ItaniumPartialDemangler("_ZN3Foo3barIiEEvi")
d.full_name # 'void Foo::bar<int>(int)'
d.function_base_name # 'bar'
d.function_decl_context # 'Foo'
d.function_name # 'Foo::bar<int>'
d.function_parameters # '(int)'
d.function_return_type # 'void'
d.is_function # True
d.is_data # False
d.is_ctor_or_dtor # False
d.is_special_name # False
d.has_function_qualifiers # False
String properties return None when the property doesn't apply (e.g. function_name on a data symbol).
Version availability
| Feature | Minimum LLVM |
|---|---|
demangle, itanium_demangle, microsoft_demangle |
11 |
ItaniumPartialDemangler |
11 |
rust_demangle |
13 |
dlang_demangle, non_microsoft_demangle |
14 |
MSDF_NO_VARIABLE_TYPE |
14 |
itanium_demangle(parse_params=) |
18 |
non_microsoft_demangle(parse_params=) |
18 |
get_arm64ec_insertion_point |
19 |
Functions unavailable for the selected LLVM backend raise NotImplementedError.
Build from source
# 1. Vendor LLVM Demangle source (downloads from GitHub releases)
python vendor_llvm.py --llvm-version 18
python vendor_llvm.py --llvm-version 21
# 2. Build & install (compiles backends for all vendored versions)
pip install .
Supported LLVM versions: 11–21. Only vendored versions are compiled.
License
- Wrapper code: 0BSD
- LLVM Demangle source: Apache 2.0 with LLVM Exception
Metadata
Release files for llvm-demangle-fxti 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llvm_demangle_fxti-1.0.0.tar.gz | 886.7 kB | With provenance | Details for llvm_demangle_fxti-1.0.0.tar.gz |
Built distributions (wheels)
Total release size: 28.4 MB
Release files / llvm_demangle_fxti-1.0.0.tar.gz
| Download URL | llvm_demangle_fxti-1.0.0.tar.gz |
|---|---|
| Size | 886.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c87b267521988f185c86b4eb7fe218fe1a09ddda601e881822761a3443d29ae
|
|
BLAKE2b-256 checksum How to use checksums |
04819181de204a23a8e23b0a5f5b31ae11d5907fb075651ffcf75a4f6bc74f5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logRelease files / llvm_demangle_fxti-1.0.0-cp36-abi3-win_amd64.whl
| Download URL | llvm_demangle_fxti-1.0.0-cp36-abi3-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.6 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
91de5620086570a338aeb696ef4f9cc43e50256b9512bbc158d5d00fcca734c0
|
|
BLAKE2b-256 checksum How to use checksums |
ad76da264e2940a05e39ad497a262325a77e6d033886cd3259ed0d3e6c68cfc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logRelease files / llvm_demangle_fxti-1.0.0-cp36-abi3-win32.whl
| Download URL | llvm_demangle_fxti-1.0.0-cp36-abi3-win32.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.6 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
9dde9976ce511343275385ec988a945e1d039d221b121a0b4f8faa023dcc3ebe
|
|
BLAKE2b-256 checksum How to use checksums |
8716e18a066f438ad5ca20b9a36b06504913d48384b720708947d660a1cc1c6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logRelease files / llvm_demangle_fxti-1.0.0-cp36-abi3-musllinux_1_2_x86_64.whl
| Download URL | llvm_demangle_fxti-1.0.0-cp36-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 11.5 MB |
| Tags | CPython 3.6 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1130c0d79ee0335875b2409b991587257ada2202ffe37a8a65b606f8d0ae93ee
|
|
BLAKE2b-256 checksum How to use checksums |
ffc60bffe73d2a2419eff024bc4fb638cb4041878d77efa9a76541af8551e56b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logRelease files / llvm_demangle_fxti-1.0.0-cp36-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | llvm_demangle_fxti-1.0.0-cp36-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 10.8 MB |
| Tags | CPython 3.6 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c5f7b682277439935524849fef16234ecb983c08ef47c930287650b64ec61b31
|
|
BLAKE2b-256 checksum How to use checksums |
533eb6108a8373f9fa3af04573b2af345cc4370c03039256e3c8f6894ae89448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logRelease files / llvm_demangle_fxti-1.0.0-cp36-abi3-macosx_11_0_arm64.whl
| Download URL | llvm_demangle_fxti-1.0.0-cp36-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.6 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9e58f31894e2315a75fa5d6d3b4da1d3ee134ad7fcaef403b59f56f58f8556e2
|
|
BLAKE2b-256 checksum How to use checksums |
2046158e4ea8616902374065eda9fad9833d89b73203e8475bea9e4c28b546f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logRelease files / llvm_demangle_fxti-1.0.0-cp36-abi3-macosx_10_13_x86_64.whl
| Download URL | llvm_demangle_fxti-1.0.0-cp36-abi3-macosx_10_13_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.6 abi3 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
9deba1a28dd28450498a4ca3b0e89a51a4ae0573792297a4cef95d0289527f14
|
|
BLAKE2b-256 checksum How to use checksums |
500efa4b92d7f20497a0b63072a8017fff9f5d1a5630f0347f679404ceccfa6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logSecurity for llvm-demangle-fxti 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for llvm_demangle_fxti-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.