[llvm-commits] [dragonegg] r92478 - /dragonegg/trunk/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Mon Jan 4 05:10:46 PST 2010


Author: baldrick
Date: Mon Jan  4 07:10:46 2010
New Revision: 92478

URL: http://llvm.org/viewvc/llvm-project?rev=92478&view=rev
Log:
Port commit 90787 (evancheng) from llvm-gcc:
Set alignment on bitfield access. Patch by Chris Lattner.

Modified:
    dragonegg/trunk/llvm-convert.cpp

Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=92478&r1=92477&r2=92478&view=diff

==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Mon Jan  4 07:10:46 2010
@@ -6212,9 +6212,9 @@
 
     // Okay, everything is good.  Return this as a bitfield if we can't
     // return it as a normal l-value. (e.g. "struct X { int X : 32 };" ).
-    // Conservatively return LValue with alignment 1.
     if (BitfieldSize != LLVMValueBitSize || BitStart != 0)
-      return LValue(FieldPtr, 1, BitStart, BitfieldSize);
+      return LValue(FieldPtr, LVAlign, BitStart, BitfieldSize);
+    
   } else {
     // Make sure we return a pointer to the right type.
     const Type *EltTy = ConvertType(TREE_TYPE(exp));





More information about the llvm-commits mailing list