>> Alternatively I can take the Padding bit into account in the >> StructType::get code somehow. Anyone have a strong opinion? > > Shouldn't it be a map from the gcc type to the padding info? > That said, you can get rid of the padding info as far as I'm > concerned. However Chris might have a different opinion - I > think he introduced it.I don't think I introduced it (was it Devang?). However, I agree with duncan: the right fix is to make the StructTypeInfoMap be indexed by a GCC type, not an llvm type. I am not fully familiar with how StructTypeInfoMap works, but I wouldn't be surprised if this caused other subtle miscompilations. -Chris
On Feb 15, 2008, at 10:08 AM, Chris Lattner wrote:>>> Alternatively I can take the Padding bit into account in the >>> StructType::get code somehow. Anyone have a strong opinion? >> >> Shouldn't it be a map from the gcc type to the padding info? >> That said, you can get rid of the padding info as far as I'm >> concerned. However Chris might have a different opinion - I >> think he introduced it. > > I don't think I introduced it (was it Devang?).Yup. PR 1278> However, I agree with > duncan: the right fix is to make the StructTypeInfoMap be indexed by a > GCC type, not an llvm type. I am not fully familiar with how > StructTypeInfoMap works, but I wouldn't be surprised if this caused > other subtle miscompilations. > > -Chris > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev- Devang
On Feb 15, 2008, at 10:23 AM, Devang Patel wrote:> > On Feb 15, 2008, at 10:08 AM, Chris Lattner wrote: > >>>> Alternatively I can take the Padding bit into account in the >>>> StructType::get code somehow. Anyone have a strong opinion? >>> >>> Shouldn't it be a map from the gcc type to the padding info? >>> That said, you can get rid of the padding info as far as I'm >>> concerned. However Chris might have a different opinion - I >>> think he introduced it. >> >> I don't think I introduced it (was it Devang?). > > Yup. PR 1278Ok! Can you please fix it to index by GCC type? There is a many to one mapping between gcc types and llvm types. -Chris