[lld] r258718 - Initialize member variable.

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 12:41:48 PST 2016


Author: pete
Date: Mon Jan 25 14:41:48 2016
New Revision: 258718

URL: http://llvm.org/viewvc/llvm-project?rev=258718&view=rev
Log:
Initialize member variable.

Found by Rafael using valgrind in https://llvm.org/bugs/show_bug.cgi?id=21466.

Modified:
    lld/trunk/lib/ReaderWriter/MachO/File.h

Modified: lld/trunk/lib/ReaderWriter/MachO/File.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/File.h?rev=258718&r1=258717&r2=258718&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/File.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/File.h Mon Jan 25 14:41:48 2016
@@ -252,7 +252,7 @@ private:
   MachOLinkingContext::ObjCConstraint _objcConstraint =
       MachOLinkingContext::objc_unknown;
   uint32_t                       _swiftVersion = 0;
-  normalized::FileFlags          _flags;
+  normalized::FileFlags          _flags = 0;
 };
 
 class MachODylibFile : public SharedLibraryFile {




More information about the llvm-commits mailing list