From f45c8b21756701642d8886bc7b6b7fbcae3c11c0 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 9 May 2019 12:21:00 +0000 Subject: [PATCH] Fix uninitialized value warnings in StatepointBase constructors. NFCI. llvm-svn: 360335 --- llvm/include/llvm/IR/Statepoint.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/llvm/include/llvm/IR/Statepoint.h b/llvm/include/llvm/IR/Statepoint.h index aec0e9b..89f130b 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(I); - } + StatepointCall = isStatepoint(I) ? cast(I) : nullptr; } explicit StatepointBase(CallBaseTy *Call) { - if (isStatepoint(Call)) - StatepointCall = Call; + StatepointCall = isStatepoint(Call) ? Call : nullptr; } public: -- 2.7.4