[llvm-commits] [127872] Fix objective-c runtime data alignment.

Devang Patel dpatel at apple.com
Thu May 31 13:14:40 CDT 2007


On May 31, 2007, at 11:12 AM, Chris Lattner wrote:

>
> Hi Devang,
>
>> +extern int flag_next_runtime;
>> +
>
> Is this around in non-objc compilers?

yes.

>
>
>> // 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.

OK.
-
Devang

>  Is there a problem with that?
>
> -Chris
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list