[clang] c6bcdc4 - [CodeGen] Modernize GuardInfo (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 20 09:43:16 PDT 2023


Author: Kazu Hirata
Date: 2023-08-20T09:43:02-07:00
New Revision: c6bcdc42c1a7bfaa44d7823bb72444925e0b383b

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

LOG: [CodeGen] Modernize GuardInfo (NFC)

Added: 
    

Modified: 
    clang/lib/CodeGen/MicrosoftCXXABI.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index a14efbdba76b0b..b60aa0c07deb94 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -828,9 +828,9 @@ class MicrosoftCXXABI : public CGCXXABI {
   /// Info on the global variable used to guard initialization of static locals.
   /// The BitIndex field is only used for externally invisible declarations.
   struct GuardInfo {
-    GuardInfo() : Guard(nullptr), BitIndex(0) {}
-    llvm::GlobalVariable *Guard;
-    unsigned BitIndex;
+    GuardInfo() = default;
+    llvm::GlobalVariable *Guard = nullptr;
+    unsigned BitIndex = 0;
   };
 
   /// Map from DeclContext to the current guard variable.  We assume that the


        


More information about the cfe-commits mailing list