diff options
-rw-r--r-- | llvm/include/llvm/IR/Statepoint.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/include/llvm/IR/Statepoint.h b/llvm/include/llvm/IR/Statepoint.h index aec0e9b6d87..89f130bc335 100644 --- a/llvm/include/llvm/IR/Statepoint.h +++ b/llvm/include/llvm/IR/Statepoint.h @@ -76,14 +76,11 @@ class StatepointBase { protected: explicit StatepointBase(InstructionTy *I) { - if (isStatepoint(I)) { - StatepointCall = cast<CallBaseTy>(I); - } + StatepointCall = isStatepoint(I) ? cast<CallBaseTy>(I) : nullptr; } explicit StatepointBase(CallBaseTy *Call) { - if (isStatepoint(Call)) - StatepointCall = Call; + StatepointCall = isStatepoint(Call) ? Call : nullptr; } public: |