From 73feb0c5202e118c7467ae99466bf446239da7b7 Mon Sep 17 00:00:00 2001 From: Frederic Riss Date: Thu, 20 Nov 2014 16:24:29 +0000 Subject: [PATCH] Remove now dead code. After LLVM r222434, the Variables field of DISubprograms for forward declarations will always be null. No need to keep code around to delete them. llvm-svn: 222437 --- clang/lib/CodeGen/CGDebugInfo.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 343b343..9506cef 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -3413,13 +3413,6 @@ void CGDebugInfo::finalize() { else VH = it->second; - // Functions have a fake temporary MDNode operand that is supposed - // to get RAUWed upon DIBuilder finalization. Do not leak these - // nodes for the temporary functions we are about to delete. - if (FwdDecl.isSubprogram()) - if (llvm::MDNode *Vars = llvm::DISubprogram(FwdDecl).getVariablesNodes()) - llvm::MDNode::deleteTemporary(Vars); - FwdDecl.replaceAllUsesWith(CGM.getLLVMContext(), llvm::DIDescriptor(cast(VH))); } -- 2.7.4