llvm.org GIT mirror llvm / 6e4bbf0
IR: Use unique_ptr, NFC Use `std::unique_ptr<>`, as suggested by David Blaikie. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225749 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 5 years ago
1 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
302302 MDNode *N0 = MDNode::get(Context, None);
303303
304304 // !1 = !{!3, null}
305 MDNodeFwdDecl *Temp3 = MDNode::getTemporary(Context, None);
306 Metadata *Ops1[] = {Temp3, nullptr};
305 std::unique_ptr Temp3(MDNode::getTemporary(Context, None));
306 Metadata *Ops1[] = {Temp3.get(), nullptr};
307307 MDNode *N1 = MDNode::get(Context, Ops1);
308308
309309 // !2 = !{!3, !0}
310 Metadata *Ops2[] = {Temp3, N0};
310 Metadata *Ops2[] = {Temp3.get(), N0};
311311 MDNode *N2 = MDNode::get(Context, Ops2);
312312
313313 // !3 = !{!2}
314314 Metadata *Ops3[] = {N2};
315315 MDNode *N3 = MDNode::get(Context, Ops3);
316316 Temp3->replaceAllUsesWith(N3);
317 delete Temp3;
318317
319318 // !4 = !{!1}
320319 Metadata *Ops4[] = {N1};