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

dpatel at apple.com dpatel at apple.com
Thu May 31 10:39:08 PDT 2007


Revision: 127872
Author:   dpatel
Date:     2007-05-31 10:39:08 -0700 (Thu, 31 May 2007)

Log Message:
-----------
Fix objective-c runtime data alignment.

Modified Paths:
--------------
    apple-local/branches/llvm/gcc/llvm-backend.cpp

Modified: apple-local/branches/llvm/gcc/llvm-backend.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-backend.cpp	2007-05-31 11:13:57 UTC (rev 127871)
+++ apple-local/branches/llvm/gcc/llvm-backend.cpp	2007-05-31 17:39:08 UTC (rev 127872)
@@ -68,6 +68,8 @@
 #include "langhooks.h"
 }
 
+extern int flag_next_runtime;
+
 // 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
     }
     





More information about the llvm-commits mailing list