summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Analysis/PhiValuesTest.cpp
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-01-31 21:51:58 +0000
committerJames Y Knight <jyknight@google.com>2019-01-31 21:51:58 +0000
commitfadf25068e32b44b010e6e03c6ab93bec41eae82 (patch)
tree9b22878f495e0b75d9e86cd01bcf199308dc9234 /llvm/unittests/Analysis/PhiValuesTest.cpp
parentc62214da3de04f702e29e4ba4772c9463e2829ca (diff)
downloadbcm5719-llvm-fadf25068e32b44b010e6e03c6ab93bec41eae82.tar.gz
bcm5719-llvm-fadf25068e32b44b010e6e03c6ab93bec41eae82.zip
Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."
This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791). Seems to run into compilation failures with GCC (but not clang, where I tested it). Reverting while I investigate. llvm-svn: 352800
Diffstat (limited to 'llvm/unittests/Analysis/PhiValuesTest.cpp')
-rw-r--r--llvm/unittests/Analysis/PhiValuesTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/unittests/Analysis/PhiValuesTest.cpp b/llvm/unittests/Analysis/PhiValuesTest.cpp
index 6fd3f6d6654..ec60255cf12 100644
--- a/llvm/unittests/Analysis/PhiValuesTest.cpp
+++ b/llvm/unittests/Analysis/PhiValuesTest.cpp
@@ -26,8 +26,7 @@ TEST(PhiValuesTest, SimplePhi) {
Type *I32PtrTy = Type::getInt32PtrTy(C);
// Create a function with phis that do not have other phis as incoming values
- Function *F = Function::Create(FunctionType::get(VoidTy, false),
- Function::ExternalLinkage, "f", M);
+ Function *F = cast<Function>(M.getOrInsertFunction("f", FunctionType::get(VoidTy, false)));
BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
BasicBlock *If = BasicBlock::Create(C, "if", F);
@@ -93,8 +92,7 @@ TEST(PhiValuesTest, DependentPhi) {
Type *I32PtrTy = Type::getInt32PtrTy(C);
// Create a function with a phi that has another phi as an incoming value
- Function *F = Function::Create(FunctionType::get(VoidTy, false),
- Function::ExternalLinkage, "f", M);
+ Function *F = cast<Function>(M.getOrInsertFunction("f", FunctionType::get(VoidTy, false)));
BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
BasicBlock *If1 = BasicBlock::Create(C, "if1", F);
OpenPOWER on IntegriCloud