[clang] [llvm] [clang][LLVM Demangler] Add an assertion that validates that all mang… (PR #111391)

Viktoriia Bakalova via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 8 00:43:09 PDT 2024


================
@@ -462,6 +462,9 @@ ENUM_CODEGENOPT(ZeroCallUsedRegs, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind,
 /// non-deleting destructors. (No effect on Microsoft ABI.)
 CODEGENOPT(CtorDtorReturnThis, 1, 0)
 
+/// Whether to validate if a produced mangled name can be demangled with LLVM demangler.
+CODEGENOPT(NoDemanglingFailures, 1, 0)
----------------
VitaNuo wrote:

The macro signature is `CODEGENOPT(Name, Bits, Default)`, so I assume you're referring to the `Default` as being inverted (the bit count is 1, since this is a flag).

IIUC `0` means that the flag is off (= don't apply the assertion), `1` means the flag is on (= apply the assertion and validate that mangled names can be demangled). We don't want to set the flag to on by default, so `0` seems right.

Could you explain why you believe this inverted? I'm probably missing something.

https://github.com/llvm/llvm-project/pull/111391


More information about the cfe-commits mailing list