IR: Fix unit test memory leak reported by ASan

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/603/steps/check-llvm%20asan/logs/stdio

Thanks Alexey for pointing me to this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225721 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2015-01-12 22:46:15 +00:00
parent 3d6fed1a57
commit 5e3ba22b3a

View File

@ -314,6 +314,7 @@ TEST_F(MDNodeTest, handleChangedOperandRecursion) {
Metadata *Ops3[] = {N2};
MDNode *N3 = MDNode::get(Context, Ops3);
Temp3->replaceAllUsesWith(N3);
delete Temp3;
// !4 = !{!1}
Metadata *Ops4[] = {N1};