[llvm] r360335 - Fix uninitialized value warnings in StatepointBase constructors. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 05:21:00 PDT 2019
Author: rksimon
Date: Thu May 9 05:21:00 2019
New Revision: 360335
URL: http://llvm.org/viewvc/llvm-project?rev=360335&view=rev
Log:
Fix uninitialized value warnings in StatepointBase constructors. NFCI.
Modified:
llvm/trunk/include/llvm/IR/Statepoint.h
Modified: llvm/trunk/include/llvm/IR/Statepoint.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Statepoint.h?rev=360335&r1=360334&r2=360335&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Statepoint.h (original)
+++ llvm/trunk/include/llvm/IR/Statepoint.h Thu May 9 05:21:00 2019
@@ -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:
More information about the llvm-commits
mailing list