diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-09 12:21:00 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-09 12:21:00 +0000 |
commit | f45c8b21756701642d8886bc7b6b7fbcae3c11c0 (patch) | |
tree | 537d2450a8b9bec1fe94461b81b3d1a362be5733 | |
parent | a186edbc000af7b6c4dbb243585d7949dd25eabb (diff) | |
download | bcm5719-llvm-f45c8b21756701642d8886bc7b6b7fbcae3c11c0.tar.gz bcm5719-llvm-f45c8b21756701642d8886bc7b6b7fbcae3c11c0.zip |
Fix uninitialized value warnings in StatepointBase constructors. NFCI.
llvm-svn: 360335
-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: |