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 | 0710e551efb70fab61e1afc8e7d7a7079b6810e0 (patch) | |
| tree | 85cfeb1b1057a87593d2b02c7d52b2a0681b577b /clang/lib/CodeGen | |
| parent | 5f4c61e2d7ebbde6cb282d9693babbd8a71fd9f6 (diff) | |
| download | bcm5719-llvm-0710e551efb70fab61e1afc8e7d7a7079b6810e0.tar.gz bcm5719-llvm-0710e551efb70fab61e1afc8e7d7a7079b6810e0.zip | |
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.
llvm-svn: 141350
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp index 61c15817982..31aed99825a 100644 --- a/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/clang/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! |

