diff --git a/llvm/include/llvm/IR/Constants.h b/llvm/include/llvm/IR/Constants.h index c443ec58822b0..2f7fc5652c2cd 100644 --- a/llvm/include/llvm/IR/Constants.h +++ b/llvm/include/llvm/IR/Constants.h @@ -975,6 +975,11 @@ class NoCFIValue final : public Constant { return cast(Op<0>().get()); } + /// NoCFIValue is always a pointer. + PointerType *getType() const { + return cast(Value::getType()); + } + /// Methods for support type inquiry through isa, cast, and dyn_cast: static bool classof(const Value *V) { return V->getValueID() == NoCFIValueVal;