aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-31 09:24:30 +0000
committerChris Lattner <sabre@nondot.org>2009-03-31 09:24:30 +0000
commit8b14b98babdf2ce81c5d89556fe7794ff1349b72 (patch)
tree238f99836d0bd0a4795620bf940eaf17d423a88a /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent05aa49128ccb46276265639dc9df16d5478e963c (diff)
downloadllvm-8b14b98babdf2ce81c5d89556fe7794ff1349b72.zip
llvm-8b14b98babdf2ce81c5d89556fe7794ff1349b72.tar.gz
llvm-8b14b98babdf2ce81c5d89556fe7794ff1349b72.tar.bz2
Fix a problem in ASTContext::addRecordToClass handling forward declarations.
In a case like: @class foo; foo *P; addRecordToClass was making an empty shadow struct for the foo interface and completing it. Later when an: @interface foo ... @endif foo *Q; was seen, ASTContext::addRecordToClass would think that foo was already laid out and not lay out the definition. This fixes it to create a forward declared struct the first time around, then complete it when the definition is seen. Note that this causes two tests to regress, because something is trying to get the size of the forward declared structs returned by this. Previously, this would end up getting a size of zero but now it properly dies. I'm not sure what the right solution is for this, so I xfailed the tests. Fariborz, please take a look at this. The testcase in rdar://6676794 now gets farther, but dies later because the objc ivar is not assigned a field number. As an aside, I really don't like the fact that the objc front-end is creating shadow C structs for ObjC types. This seems like an implementation detail of the code generator that could be fixed by better factoring of the extant code. llvm-svn: 68106
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions