summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
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