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

Details

Provenance
dimAuthored on Thu, Oct 24, 7:02 AM
Parents
rG4f12b529f404: sys/intr.h: formally depend on machine/intr.h
Branches
Unknown
Tags
Unknown