summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Analysis/OrderedInstructionsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Analysis/OrderedInstructionsTest.cpp')
-rw-r--r--llvm/unittests/Analysis/OrderedInstructionsTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Analysis/OrderedInstructionsTest.cpp b/llvm/unittests/Analysis/OrderedInstructionsTest.cpp
index 58eb0e56e06..1f4002fb766 100644
--- a/llvm/unittests/Analysis/OrderedInstructionsTest.cpp
+++ b/llvm/unittests/Analysis/OrderedInstructionsTest.cpp
@@ -25,7 +25,7 @@ TEST(OrderedInstructionsTest, DominanceTest) {
IRBuilder<> B(Ctx);
FunctionType *FTy =
FunctionType::get(Type::getVoidTy(Ctx), {B.getInt8PtrTy()}, false);
- Function *F = Function::Create(FTy, Function::ExternalLinkage, "f", M);
+ Function *F = cast<Function>(M.getOrInsertFunction("f", FTy));
// Create the function as follow and check for dominance relation.
//
OpenPOWER on IntegriCloud