From 55634d8e8db0f9211771b043fd8a25750a0c2081 Mon Sep 17 00:00:00 2001 From: Pete Cooper Date: Mon, 1 Feb 2016 22:24:44 +0000 Subject: MachoFile should default to using subsections_via_symbols. When we parse a MachoFile, we set a number of members from the parsed file, for example, subsectionsViaSymbols. However, a number of passes, such as ObjCPass, create local copies of MachoFile and don't get the benefit of setting flags and other fields in the parser. Instead we can just give a more sensible default as the parser will definitely get the correct value from the file anyway. llvm-svn: 259426 --- lld/lib/ReaderWriter/MachO/File.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lld/lib/ReaderWriter/MachO/File.h') diff --git a/lld/lib/ReaderWriter/MachO/File.h b/lld/lib/ReaderWriter/MachO/File.h index 04b8eeb494b..f282d5da204 100644 --- a/lld/lib/ReaderWriter/MachO/File.h +++ b/lld/lib/ReaderWriter/MachO/File.h @@ -252,7 +252,7 @@ private: MachOLinkingContext::ObjCConstraint _objcConstraint = MachOLinkingContext::objc_unknown; uint32_t _swiftVersion = 0; - normalized::FileFlags _flags = 0; + normalized::FileFlags _flags = llvm::MachO::MH_SUBSECTIONS_VIA_SYMBOLS; }; class MachODylibFile : public SharedLibraryFile { -- cgit v1.2.3