[Transforms] Use default member initialization (NFC)
authorKazu Hirata <kazu@google.com>
Mon, 13 Jun 2022 01:39:05 +0000 (18:39 -0700)
committerKazu Hirata <kazu@google.com>
Mon, 13 Jun 2022 01:39:05 +0000 (18:39 -0700)
Identified with modernize-use-default-member-init.

llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp

index 9611342..995809e 100644 (file)
@@ -163,10 +163,10 @@ struct CHRStats {
 
 // RegInfo - some properties of a Region.
 struct RegInfo {
-  RegInfo() : R(nullptr), HasBranch(false) {}
-  RegInfo(Region *RegionIn) : R(RegionIn), HasBranch(false) {}
-  Region *R;
-  bool HasBranch;
+  RegInfo() = default;
+  RegInfo(Region *RegionIn) : R(RegionIn) {}
+  Region *R = nullptr;
+  bool HasBranch = false;
   SmallVector<SelectInst *, 8> Selects;
 };