[cfe-commits] Patch for Bug 13606

John Criswell criswell at illinois.edu
Tue Aug 14 12:52:53 PDT 2012


Dear All,

Attached is a patch to partially fix the alignment attribute bug in 
PR#13606:

http://llvm.org/bugs/show_bug.cgi?id=13606

I say partially because the alignment should really be unsigned, but 
since CharUnits uses a signed value, it isn't clear to me how to fix the 
bug properly (i.e., it requires a greater knowledge of clang than I 
current have time to learn).  That said, permitting alignment up to half 
the address space should be a significant improvement.

If this patch meets your approval, please let me know, and I can commit 
it (I already have commit access to the LLVM SVN repository).

-- John T.

-------------- next part --------------
Index: lib/CodeGen/CGValue.h
===================================================================
--- lib/CodeGen/CGValue.h	(revision 161882)
+++ lib/CodeGen/CGValue.h	(working copy)
@@ -128,7 +128,7 @@
 
   // The alignment to use when accessing this lvalue.  (For vector elements,
   // this is the alignment of the whole vector.)
-  unsigned short Alignment;
+  long Alignment;
 
   // objective-c's ivar
   bool Ivar:1;


More information about the cfe-commits mailing list