[SDAG] Fix release build

This variable was only declared in debug builds, but is needed
in release builds as well.
This commit is contained in:
Nikita Popov 2022-07-18 14:10:02 +02:00
parent a586c15bbb
commit 56b4b6e81b
1 changed files with 1 additions and 1 deletions

View File

@ -1226,12 +1226,12 @@ void SelectionDAGBuilder::visitGCResult(const GCResultInst &CI) {
} }
void SelectionDAGBuilder::visitGCRelocate(const GCRelocateInst &Relocate) { void SelectionDAGBuilder::visitGCRelocate(const GCRelocateInst &Relocate) {
const Value *Statepoint = Relocate.getStatepoint();
#ifndef NDEBUG #ifndef NDEBUG
// Consistency check // Consistency check
// We skip this check for relocates not in the same basic block as their // We skip this check for relocates not in the same basic block as their
// statepoint. It would be too expensive to preserve validation info through // statepoint. It would be too expensive to preserve validation info through
// different basic blocks. // different basic blocks.
const Value *Statepoint = Relocate.getStatepoint();
assert((isa<GCStatepointInst>(Statepoint) || isa<UndefValue>(Statepoint)) && assert((isa<GCStatepointInst>(Statepoint) || isa<UndefValue>(Statepoint)) &&
"GetStatepoint must return one of two types"); "GetStatepoint must return one of two types");
if (isa<UndefValue>(Statepoint)) if (isa<UndefValue>(Statepoint))