Skip to content

Commit c20cb55

Browse files
committed
Avoid unused variable when NDEBUG
1 parent 7bda1a0 commit c20cb55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/ExecutionEngine/JITLink/x86_64.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ Error optimize_x86_64_GOTAndStubs(LinkGraph &G) {
7676
for (auto &E : B->edges()) {
7777
if (E.getKind() == x86_64::PCRel32GOTLoadRelaxable ||
7878
E.getKind() == x86_64::PCRel32GOTLoadREXRelaxable) {
79+
#ifndef NDEBUG
7980
bool REXPrefix = E.getKind() == x86_64::PCRel32GOTLoadREXRelaxable;
8081
assert(E.getOffset() >= (REXPrefix ? 3 : 2) &&
8182
"GOT edge occurs too early in block");
83+
#endif
8284
auto *FixupData = reinterpret_cast<uint8_t *>(
8385
const_cast<char *>(B->getContent().data())) +
8486
E.getOffset();

0 commit comments

Comments
 (0)