diff options
| author | John McCall <rjmccall@apple.com> | 2011-10-07 02:39:22 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-10-07 02:39:22 +0000 |
| commit | 6595935602f57b4f2115785bb39dabc83e4232dc (patch) | |
| tree | 00031287c3e8c72cb0a996d43acf006ef0c6c9db /lib/CodeGen/CodeGenTypes.cpp | |
| parent | aa2176b4cd1115adb29f29eca3e6e2fc6d543170 (diff) | |
| download | clang-6595935602f57b4f2115785bb39dabc83e4232dc.tar.gz clang-6595935602f57b4f2115785bb39dabc83e4232dc.tar.bz2 clang-6595935602f57b4f2115785bb39dabc83e4232dc.tar.xz | |
Record layout requires not just a definition, but a complete
definition. Assert this. Change IR generation to not try to
aggressively emit the IR translation of a record during its
own definition. Fixes PR10912.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141350 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 61c1581798..31aed99825 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -579,7 +579,7 @@ llvm::StructType *CodeGenTypes::ConvertRecordDeclType(const RecordDecl *RD) { // If this is still a forward declaration, or the LLVM type is already // complete, there's nothing more to do. RD = RD->getDefinition(); - if (RD == 0 || !Ty->isOpaque()) + if (RD == 0 || !RD->isDefinition() || !Ty->isOpaque()) return Ty; // If converting this type would cause us to infinitely loop, don't do it! |
