Simplify this unittest.

Thanks to dblaikie for the suggestion!

llvm-svn: 260125
This commit is contained in:
Adrian Prantl 2016-02-08 19:13:15 +00:00
parent fc8c5048dc
commit 817c47bb42
1 changed files with 2 additions and 5 deletions

View File

@ -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());