From 0bc2f553bc129b43503de1cdcc9d24c7016c1298 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 16 Apr 2023 12:43:02 -0700 Subject: [PATCH] [InstCombine] Modernize InstCombineOptions (NFC) Identified with modernize-use-default-member-init. --- llvm/include/llvm/Transforms/InstCombine/InstCombine.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llvm/include/llvm/Transforms/InstCombine/InstCombine.h b/llvm/include/llvm/Transforms/InstCombine/InstCombine.h index 9c6bcc6..557d0a4 100644 --- a/llvm/include/llvm/Transforms/InstCombine/InstCombine.h +++ b/llvm/include/llvm/Transforms/InstCombine/InstCombine.h @@ -28,11 +28,10 @@ namespace llvm { static constexpr unsigned InstCombineDefaultMaxIterations = 1000; struct InstCombineOptions { - bool UseLoopInfo; - unsigned MaxIterations; + bool UseLoopInfo = false; + unsigned MaxIterations = InstCombineDefaultMaxIterations; - InstCombineOptions() - : UseLoopInfo(false), MaxIterations(InstCombineDefaultMaxIterations) {} + InstCombineOptions() = default; InstCombineOptions &setUseLoopInfo(bool Value) { UseLoopInfo = Value; -- 2.7.4