From d6884a0b90091a063478ec7fa31f6d76c94e4917 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 4 May 2009 05:16:21 +0000 Subject: Add -fobjc-tight-layout. - This implements gcc style Objective-C interface layout (I think). Currently it is always off, there is no functionality change unless this is passed. For the curious, the deal is that gcc lays out the fields of a subclass as if they were part of the superclass. That is, the subclass fields immediately follow the super class fields instead of being padded to the alignment of the superclass structure. - Currently gcc uses the tight layout in 32-bit and 64-bit modes, and llvm-gcc uses it in 32-bit only, for reasons which aren't clear yet. We probably want to switch to matching gcc, once this makes it through testing... my hope is that we can also fix llvm-gcc in order to maintain compatibility between the compilers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70827 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Driver/Tools.cpp') diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index a714be81c3..2a959b3c55 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -466,6 +466,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_fobjc_gc); // FIXME: Should we remove this? Args.AddLastArg(CmdArgs, options::OPT_fobjc_nonfragile_abi); + Args.AddLastArg(CmdArgs, options::OPT_fobjc_tight_layout); Args.AddLastArg(CmdArgs, options::OPT_fprint_source_range_info); Args.AddLastArg(CmdArgs, options::OPT_fdiagnostics_print_source_range_info); Args.AddLastArg(CmdArgs, options::OPT_ftime_report); -- cgit v1.2.3-18-g5258