llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.86k stars 11.92k forks source link

[clang][ItaniumMangle] `clang` should validate that the LLVM demangler can handle all the mangled names it produces. #111345

Open VitaNuo opened 4 weeks ago

VitaNuo commented 4 weeks ago

clang sometimes produces C++ mangled names that do not demangle with LLVM demangler. It seems reasonable for clang to confirm that all mangled names demangle, i.e., come back without a _Z prefix (or ? prefix in MS mode) from llvm::demangle API.

This could be implemented in an asserts build. This should also be done behind a flag to prevent unintended breakages.

llvmbot commented 4 weeks ago

@llvm/issue-subscribers-clang-frontend

Author: Viktoriia Bakalova (VitaNuo)

`clang` sometimes produces C++ mangled names that do not demangle with LLVM demangler. It seems reasonable for `clang` to confirm that all mangled names demangle, i.e., come back without a `_Z` prefix (or ? prefix in MS mode) from `llvm::demangle` API. This could be implemented in an `asserts` build. This should also be done behind a flag to prevent unintended breakages.
llvmbot commented 4 weeks ago

@llvm/issue-subscribers-clang-driver

Author: Viktoriia Bakalova (VitaNuo)

`clang` sometimes produces C++ mangled names that do not demangle with LLVM demangler. It seems reasonable for `clang` to confirm that all mangled names demangle, i.e., come back without a `_Z` prefix (or ? prefix in MS mode) from `llvm::demangle` API. This could be implemented in an `asserts` build. This should also be done behind a flag to prevent unintended breakages.
llvmbot commented 4 weeks ago

@llvm/issue-subscribers-clang-codegen

Author: Viktoriia Bakalova (VitaNuo)

`clang` sometimes produces C++ mangled names that do not demangle with LLVM demangler. It seems reasonable for `clang` to confirm that all mangled names demangle, i.e., come back without a `_Z` prefix (or ? prefix in MS mode) from `llvm::demangle` API. This could be implemented in an `asserts` build. This should also be done behind a flag to prevent unintended breakages.