Skip to content

Commit 1fce2e2

Browse files
bgergely0GeneraluseAI
authored andcommitted
[BOLT] Fix assertion test (llvm#169635)
The AArch64_BTI MCPlusBuilder unittest was failing in no assertion builds. Add `#ifndef NDEBUG` to exclude the assertion test from no assertion builds.
1 parent 8496184 commit 1fce2e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bolt/unittests/Core/MCPlusBuilder.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ TEST_P(MCPlusBuilderTester, AArch64_BTI) {
171171
ASSERT_EQ(II->getOperand(0).getImm(), 34);
172172
ASSERT_TRUE(BC->MIB->isBTILandingPad(*II, true, false));
173173

174+
#ifndef NDEBUG
174175
MCInst BTIinvalid;
175176
ASSERT_DEATH(BC->MIB->createBTI(BTIinvalid, false, false),
176177
"No target kinds!");
178+
#endif
177179

178180
MCInst Paciasp = MCInstBuilder(AArch64::PACIASP);
179181
II = BB->addInstruction(Paciasp);

0 commit comments

Comments
 (0)