[bolt] silence unused variables warnings

This commit is contained in:
Thorsten Schütt 2022-08-06 20:51:40 +02:00
parent ede96de751
commit 0c9258612b
2 changed files with 3 additions and 0 deletions

View File

@ -769,6 +769,7 @@ BinaryContext::getOrCreateJumpTable(BinaryFunction &Function, uint64_t Address,
auto isFragmentOf = [](BinaryFunction *Fragment, BinaryFunction *Parent) {
return (Fragment->isFragment() && Fragment->isParentFragment(Parent));
};
(void)isFragmentOf;
// Two fragments of same function access same jump table
if (JumpTable *JT = getJumpTableContainingAddress(Address)) {
@ -795,6 +796,7 @@ BinaryContext::getOrCreateJumpTable(BinaryFunction &Function, uint64_t Address,
}
bool IsJumpTableParent = false;
(void)IsJumpTableParent;
for (BinaryFunction *Frag : JT->Parents)
if (Frag == &Function)
IsJumpTableParent = true;

View File

@ -191,6 +191,7 @@ void BinaryFunction::parseLSDA(ArrayRef<uint8_t> LSDASectionData,
BinaryFunction *Parent) -> bool {
return (Fragment->isFragment() && Fragment->isParentFragment(Parent));
};
(void)isFragmentOf;
assert((isFragmentOf(this, Fragment) || isFragmentOf(Fragment, this)) &&
"BOLT-ERROR: cannot have landing pads in different "
"functions");