diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-06-18 23:32:21 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-06-18 23:32:21 +0000 |
| commit | 1f56b2a4f1a2ba67e1aa125446bd5ed84ba5eee5 (patch) | |
| tree | ef73e9df11cd03d9d981c86c4bb760b545d4de46 /clang/lib | |
| parent | abe18db2686a1ab0ac67e2c336b2c1ea1daeeca7 (diff) | |
| download | bcm5719-llvm-1f56b2a4f1a2ba67e1aa125446bd5ed84ba5eee5.tar.gz bcm5719-llvm-1f56b2a4f1a2ba67e1aa125446bd5ed84ba5eee5.zip | |
Add some comments to r184252.
rdar://problem/14101097
llvm-svn: 184259
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index a5e9e4e092e..563faa4f780 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1379,7 +1379,12 @@ llvm::DIType CGDebugInfo::getOrCreateInterfaceType(QualType D, /// CreateType - get structure or union type. llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty, bool Declaration) { RecordDecl *RD = Ty->getDecl(); + // Limited debug info should only remove struct definitions that can + // safely be replaced by a forward declaration in the source code. if (DebugKind <= CodeGenOptions::LimitedDebugInfo && Declaration) { + // FIXME: This implementation is problematic; there are some test + // cases where we violate the above principle, such as + // test/CodeGen/debug-info-records.c . llvm::DIDescriptor FDContext = getContextDescriptor(cast<Decl>(RD->getDeclContext())); llvm::DIType RetTy = createRecordFwdDecl(RD, FDContext); |

