HomeFreeBSD

Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS

Description

Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS

Some internal checking functions should only be declared when both
NDEBUG and LLVM_ENABLE_ABI_BREAKING_CHECKS are undefined, otherwise you
would get compile errors similar to:

/usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:921:13: error: no member named 'VerifyDAGDivergence' in 'llvm::SelectionDAG'
 921 |     CurDAG->VerifyDAGDivergence();
     |     ~~~~~~  ^

Adjust the conditions for declaring and using these functions. This has
also been reported upstream.

Reported by: cy
PR: 280562
MFC after: 1 month

(cherry picked from commit a5b1eecbed07519c637095e3291b9cbd9748e823)

Details

Provenance
dimAuthored on Oct 24 2024, 7:02 AM
Parents
rGaed18551af0e: Merge llvm-project release/19.x llvmorg-19.1.2-0-g7ba7d8e2f7b6
Branches
Unknown
Tags
Unknown