summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-06-18 23:01:56 +0000
committerAdrian Prantl <aprantl@apple.com>2013-06-18 23:01:56 +0000
commitc1a3fe7f9bbf80470992b60d7e3b67b7e26f9b67 (patch)
treed5ef2ed6e9b2092a83d5fa1d5917b205bc3c9893 /clang/lib
parentf02500c74c51304c059840681003d21bcb66ba1d (diff)
downloadbcm5719-llvm-c1a3fe7f9bbf80470992b60d7e3b67b7e26f9b67.tar.gz
bcm5719-llvm-c1a3fe7f9bbf80470992b60d7e3b67b7e26f9b67.zip
Emit forward decls for structs with declarations only when we are
limiting debug info. FIXME: There is still work left to do here, the testcase should work even with -flimit-debug-info. rdar://problem/14101097 llvm-svn: 184252
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 07cbdeea103..a5e9e4e092e 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1379,7 +1379,7 @@ 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();
- if (Declaration) {
+ if (DebugKind <= CodeGenOptions::LimitedDebugInfo && Declaration) {
llvm::DIDescriptor FDContext =
getContextDescriptor(cast<Decl>(RD->getDeclContext()));
llvm::DIType RetTy = createRecordFwdDecl(RD, FDContext);
OpenPOWER on IntegriCloud