forked from OSchip/llvm-project
Avoid unused variable when NDEBUG
This commit is contained in:
parent
7bda1a0711
commit
c20cb5547d
|
@ -76,9 +76,11 @@ Error optimize_x86_64_GOTAndStubs(LinkGraph &G) {
|
||||||
for (auto &E : B->edges()) {
|
for (auto &E : B->edges()) {
|
||||||
if (E.getKind() == x86_64::PCRel32GOTLoadRelaxable ||
|
if (E.getKind() == x86_64::PCRel32GOTLoadRelaxable ||
|
||||||
E.getKind() == x86_64::PCRel32GOTLoadREXRelaxable) {
|
E.getKind() == x86_64::PCRel32GOTLoadREXRelaxable) {
|
||||||
|
#ifndef NDEBUG
|
||||||
bool REXPrefix = E.getKind() == x86_64::PCRel32GOTLoadREXRelaxable;
|
bool REXPrefix = E.getKind() == x86_64::PCRel32GOTLoadREXRelaxable;
|
||||||
assert(E.getOffset() >= (REXPrefix ? 3 : 2) &&
|
assert(E.getOffset() >= (REXPrefix ? 3 : 2) &&
|
||||||
"GOT edge occurs too early in block");
|
"GOT edge occurs too early in block");
|
||||||
|
#endif
|
||||||
auto *FixupData = reinterpret_cast<uint8_t *>(
|
auto *FixupData = reinterpret_cast<uint8_t *>(
|
||||||
const_cast<char *>(B->getContent().data())) +
|
const_cast<char *>(B->getContent().data())) +
|
||||||
E.getOffset();
|
E.getOffset();
|
||||||
|
|
Loading…
Reference in New Issue