Fix initialization order of class members.
authorZachary Turner <zturner@google.com>
Wed, 12 Apr 2017 23:27:43 +0000 (23:27 +0000)
committerZachary Turner <zturner@google.com>
Wed, 12 Apr 2017 23:27:43 +0000 (23:27 +0000)
llvm-svn: 300137

llvm/include/llvm/DebugInfo/PDB/UDTLayout.h
llvm/lib/DebugInfo/PDB/UDTLayout.cpp

index f7fdb7c..fca2d43 100644 (file)
@@ -112,10 +112,10 @@ protected:
 
   void addChildToLayout(std::unique_ptr<StorageItemBase> Child);
 
-  uint32_t SizeOf = 0;
+  const PDBSymbol &SymbolBase;
   std::string Name;
+  uint32_t SizeOf = 0;
 
-  const PDBSymbol &SymbolBase;
   BitVector UsedBytes;
   std::vector<std::unique_ptr<PDBSymbol>> NonStorageItems;
   std::vector<std::unique_ptr<StorageItemBase>> ChildStorage;
index 525913c..5751e02 100644 (file)
@@ -42,8 +42,8 @@ StorageItemBase::StorageItemBase(const UDTLayoutBase &Parent,
                                  const PDBSymbol &Symbol,
                                  const std::string &Name,
                                  uint32_t OffsetInParent, uint32_t Size)
-    : Parent(Parent), Symbol(Symbol), Name(Name), SizeOf(Size),
-      OffsetInParent(OffsetInParent) {
+    : Parent(Parent), Symbol(Symbol), Name(Name),
+      OffsetInParent(OffsetInParent), SizeOf(Size) {
   UsedBytes.resize(SizeOf, true);
 }