[llvm-commits] [127872] Fix objective-c runtime data alignment.
Chris Lattner
clattner at apple.com
Thu May 31 11:12:35 PDT 2007
Hi Devang,
> +extern int flag_next_runtime;
> +
Is this around in non-objc compilers?
> // Non-zero if bytecode from PCH is successfully read.
> int flag_llvm_pch_read;
>
> @@ -733,6 +735,9 @@
> } else if (const char *Section =
> LLVM_IMPLICIT_TARGET_GLOBAL_VAR_SECTION(decl)) {
> GV->setSection(Section);
> + // Next runtime expects 4 byte alignment for Objective-C data.
> + if (flag_next_runtime)
> + GV->setAlignment(4);
> #endif
Please move this to objc-act.c. It should be sufficient to set
DECL_ALIGN on the protocol objects when the objc front-end is making
them. Is there a problem with that?
-Chris
More information about the llvm-commits
mailing list