summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-05-09 12:21:00 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-05-09 12:21:00 +0000
commitf45c8b21756701642d8886bc7b6b7fbcae3c11c0 (patch)
tree537d2450a8b9bec1fe94461b81b3d1a362be5733
parenta186edbc000af7b6c4dbb243585d7949dd25eabb (diff)
downloadbcm5719-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.h7
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:
OpenPOWER on IntegriCloud