diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index e2000ea79aa..0e756d348c4 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -3019,6 +3019,8 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, llvm::Value *Storage, CGBuilderTy &Builder) { assert(DebugKind >= codegenoptions::LimitedDebugInfo); assert(!LexicalBlockStack.empty() && "Region stack mismatch, stack empty!"); + if (VD->hasAttr<NoDebugAttr>()) + return; bool Unwritten = VD->isImplicit() || (isa<Decl>(VD->getDeclContext()) && @@ -3163,6 +3165,8 @@ void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable( if (Builder.GetInsertBlock() == nullptr) return; + if (VD->hasAttr<NoDebugAttr>()) + return; bool isByRef = VD->hasAttr<BlocksAttr>(); |