Skip to content

Commit d1999ab

Browse files
committed
Use cast<>
1 parent 09370c2 commit d1999ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/IR/Constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ class BlockAddress final : public Constant {
925925
/// Transparently provide more efficient getOperand methods.
926926
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
927927

928-
BasicBlock *getBasicBlock() const { return (BasicBlock *)Op<0>().get(); }
928+
BasicBlock *getBasicBlock() const { return cast<BasicBlock>(Op<0>().get()); }
929929
Function *getFunction() const { return getBasicBlock()->getParent(); }
930930

931931
/// Methods for support type inquiry through isa, cast, and dyn_cast:

0 commit comments

Comments
 (0)