mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
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
This commit is contained in:
parent
35352518fe
commit
6e4bbf0390
@ -303,19 +303,18 @@ TEST_F(MDNodeTest, handleChangedOperandRecursion) {
|
||||
MDNode *N0 = MDNode::get(Context, None);
|
||||
|
||||
// !1 = !{!3, null}
|
||||
MDNodeFwdDecl *Temp3 = MDNode::getTemporary(Context, None);
|
||||
Metadata *Ops1[] = {Temp3, nullptr};
|
||||
std::unique_ptr<MDNodeFwdDecl> Temp3(MDNode::getTemporary(Context, None));
|
||||
Metadata *Ops1[] = {Temp3.get(), nullptr};
|
||||
MDNode *N1 = MDNode::get(Context, Ops1);
|
||||
|
||||
// !2 = !{!3, !0}
|
||||
Metadata *Ops2[] = {Temp3, N0};
|
||||
Metadata *Ops2[] = {Temp3.get(), N0};
|
||||
MDNode *N2 = MDNode::get(Context, Ops2);
|
||||
|
||||
// !3 = !{!2}
|
||||
Metadata *Ops3[] = {N2};
|
||||
MDNode *N3 = MDNode::get(Context, Ops3);
|
||||
Temp3->replaceAllUsesWith(N3);
|
||||
delete Temp3;
|
||||
|
||||
// !4 = !{!1}
|
||||
Metadata *Ops4[] = {N1};
|
||||
|
Loading…
x
Reference in New Issue
Block a user