[llvm] d5f7ae7 - [IR] Use default member initialization in IRBuilderBase (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 13 10:34:31 PST 2022


Author: Kazu Hirata
Date: 2022-02-13T10:34:05-08:00
New Revision: d5f7ae7bfe3f3cb5dbc6ec4e8f3c88de41d72cd7

URL: https://github.com/llvm/llvm-project/commit/d5f7ae7bfe3f3cb5dbc6ec4e8f3c88de41d72cd7
DIFF: https://github.com/llvm/llvm-project/commit/d5f7ae7bfe3f3cb5dbc6ec4e8f3c88de41d72cd7.diff

LOG: [IR] Use default member initialization in IRBuilderBase (NFC)

Added: 
    

Modified: 
    llvm/include/llvm/IR/IRBuilder.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 7c4f121b2e8b2..c28ccaa789a85 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -125,21 +125,18 @@ class IRBuilderBase {
   MDNode *DefaultFPMathTag;
   FastMathFlags FMF;
 
-  bool IsFPConstrained;
-  fp::ExceptionBehavior DefaultConstrainedExcept;
-  RoundingMode DefaultConstrainedRounding;
+  bool IsFPConstrained = false;
+  fp::ExceptionBehavior DefaultConstrainedExcept = fp::ebStrict;
+  RoundingMode DefaultConstrainedRounding = RoundingMode::Dynamic;
 
   ArrayRef<OperandBundleDef> DefaultOperandBundles;
 
 public:
   IRBuilderBase(LLVMContext &context, const IRBuilderFolder &Folder,
-                const IRBuilderDefaultInserter &Inserter,
-                MDNode *FPMathTag, ArrayRef<OperandBundleDef> OpBundles)
+                const IRBuilderDefaultInserter &Inserter, MDNode *FPMathTag,
+                ArrayRef<OperandBundleDef> OpBundles)
       : Context(context), Folder(Folder), Inserter(Inserter),
-        DefaultFPMathTag(FPMathTag), IsFPConstrained(false),
-        DefaultConstrainedExcept(fp::ebStrict),
-        DefaultConstrainedRounding(RoundingMode::Dynamic),
-        DefaultOperandBundles(OpBundles) {
+        DefaultFPMathTag(FPMathTag), DefaultOperandBundles(OpBundles) {
     ClearInsertionPoint();
   }
 


        


More information about the llvm-commits mailing list