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
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<llvm::MDNode>(VH)));
}