[llvm] r260125 - Simplify this unittest.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 11:13:16 PST 2016


Author: adrian
Date: Mon Feb  8 13:13:15 2016
New Revision: 260125

URL: http://llvm.org/viewvc/llvm-project?rev=260125&view=rev
Log:
Simplify this unittest.

Thanks to dblaikie for the suggestion!

Modified:
    llvm/trunk/unittests/IR/MetadataTest.cpp

Modified: llvm/trunk/unittests/IR/MetadataTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/MetadataTest.cpp?rev=260125&r1=260124&r2=260125&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/MetadataTest.cpp (original)
+++ llvm/trunk/unittests/IR/MetadataTest.cpp Mon Feb  8 13:13:15 2016
@@ -2078,12 +2078,9 @@ TEST_F(ValueAsMetadataTest, TempTempRepl
   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());




More information about the llvm-commits mailing list