summaryrefslogtreecommitdiff
path: root/unittests/IR/WaymarkTest.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
commit67c32a98315f785a9ec9d531c1f571a0196c7463 (patch)
tree4abb9cbeecc7901726dd0b4a37369596c852e9ef /unittests/IR/WaymarkTest.cpp
parent9f61947910e6ab40de38e6b4034751ef1513200f (diff)
Diffstat (limited to 'unittests/IR/WaymarkTest.cpp')
-rw-r--r--unittests/IR/WaymarkTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/unittests/IR/WaymarkTest.cpp b/unittests/IR/WaymarkTest.cpp
index 8e3cd45808f82..a8924efed3f5f 100644
--- a/unittests/IR/WaymarkTest.cpp
+++ b/unittests/IR/WaymarkTest.cpp
@@ -29,8 +29,9 @@ TEST(WaymarkTest, NativeArray) {
Value * values[22];
std::transform(tail, tail + 22, values, char2constant);
FunctionType *FT = FunctionType::get(Type::getVoidTy(getGlobalContext()), true);
- Function *F = Function::Create(FT, GlobalValue::ExternalLinkage);
- const CallInst *A = CallInst::Create(F, makeArrayRef(values));
+ std::unique_ptr<Function> F(
+ Function::Create(FT, GlobalValue::ExternalLinkage));
+ const CallInst *A = CallInst::Create(F.get(), makeArrayRef(values));
ASSERT_NE(A, (const CallInst*)nullptr);
ASSERT_EQ(1U + 22, A->getNumOperands());
const Use *U = &A->getOperandUse(0);