diff --git a/include/llvm/IR/Statepoint.h b/include/llvm/IR/Statepoint.h index 035509c11e6..e8ed63359e0 100644 --- a/include/llvm/IR/Statepoint.h +++ b/include/llvm/IR/Statepoint.h @@ -177,8 +177,9 @@ class GCRelocateOperands { ImmutableCallSite RelocateCS; public: - GCRelocateOperands(const User* U) - : GCRelocateOperands(cast(U)) {} + GCRelocateOperands(const User* U) : RelocateCS(U) { + assert(isGCRelocate(U)); + } GCRelocateOperands(const Instruction *inst) : RelocateCS(inst) { assert(isGCRelocate(inst)); }