[llvm-commits] [llvm-gcc-4.2] r98728 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Stuart Hastings
stuart at apple.com
Wed Mar 17 08:59:15 PDT 2010
Author: stuart
Date: Wed Mar 17 10:59:14 2010
New Revision: 98728
URL: http://llvm.org/viewvc/llvm-project?rev=98728&view=rev
Log:
Use GCC-specd type when referencing ObjC2 bitfields. Radar 7639995.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=98728&r1=98727&r2=98728&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Mar 17 10:59:14 2010
@@ -7021,6 +7021,11 @@
LVAlign = MinAlign(LVAlign, ByteOffset);
}
+ // Since we're using GCC's offset, we're obliged to use GCC's
+ // "shrink-wrapped" type for the reference, lest we reference
+ // memory outside of this struct.
+ FieldTy = ConvertType(TREE_TYPE(FieldDecl));
+
Value *Ptr = CastToType(Instruction::PtrToInt, StructAddrLV.Ptr,
Offset->getType());
Ptr = Builder.CreateAdd(Ptr, Offset);
More information about the llvm-commits
mailing list