mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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
This commit is contained in:
parent
4f12b529f4
commit
a5b1eecbed
4 changed files with 12 additions and 12 deletions
|
|
@ -582,7 +582,7 @@ public:
|
|||
return Root;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
void VerifyDAGDivergence();
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
AssumptionCache *AC = nullptr;
|
||||
GCFunctionInfo *GFI = nullptr;
|
||||
SSPLayoutInfo *SP = nullptr;
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
TargetTransformInfo *TTI = nullptr;
|
||||
#endif
|
||||
CodeGenOptLevel OptLevel;
|
||||
|
|
|
|||
|
|
@ -11623,7 +11623,7 @@ void SelectionDAG::CreateTopologicalOrder(std::vector<SDNode *> &Order) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
void SelectionDAG::VerifyDAGDivergence() {
|
||||
std::vector<SDNode *> TopoOrder;
|
||||
CreateTopologicalOrder(TopoOrder);
|
||||
|
|
|
|||
|
|
@ -916,7 +916,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
@ -936,7 +936,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
@ -958,7 +958,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
@ -982,7 +982,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
@ -1000,7 +1000,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
@ -1016,7 +1016,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
@ -1036,7 +1036,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
@ -1056,7 +1056,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
@ -1076,7 +1076,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
|||
<< "'\n";
|
||||
CurDAG->dump());
|
||||
|
||||
#if LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS
|
||||
if (TTI->hasBranchDivergence())
|
||||
CurDAG->VerifyDAGDivergence();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue