From 817c47bb42368cf5d158db92128b8dbf776a4962 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 8 Feb 2016 19:13:15 +0000 Subject: [PATCH] Simplify this unittest. Thanks to dblaikie for the suggestion! llvm-svn: 260125 --- llvm/unittests/IR/MetadataTest.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp index b878f2c90627..8316c7f4190a 100644 --- a/llvm/unittests/IR/MetadataTest.cpp +++ b/llvm/unittests/IR/MetadataTest.cpp @@ -2078,12 +2078,9 @@ TEST_F(ValueAsMetadataTest, TempTempReplacement) { ConstantAsMetadata *CI = ConstantAsMetadata::get( ConstantInt::get(getGlobalContext(), APInt(8, 0))); - Metadata *Ops1[] = {CI}; auto Temp1 = MDTuple::getTemporary(Context, None); - auto Temp2 = MDTuple::getTemporary(Context, Ops1); - - Metadata *Ops2[] = {Temp1.get()}; - auto *N = MDTuple::get(Context, Ops2); + auto Temp2 = MDTuple::getTemporary(Context, {CI}); + auto *N = MDTuple::get(Context, {Temp1.get()}); // Test replacing a temporary node with another temporary node. Temp1->replaceAllUsesWith(Temp2.get());