summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests')
-rw-r--r--llvm/unittests/IR/BasicBlockTest.cpp7
-rw-r--r--llvm/unittests/IR/IRBuilderTest.cpp2
-rw-r--r--llvm/unittests/IR/InstructionsTest.cpp9
3 files changed, 9 insertions, 9 deletions
diff --git a/llvm/unittests/IR/BasicBlockTest.cpp b/llvm/unittests/IR/BasicBlockTest.cpp
index bb5f1353c20..95bc242ec30 100644
--- a/llvm/unittests/IR/BasicBlockTest.cpp
+++ b/llvm/unittests/IR/BasicBlockTest.cpp
@@ -100,10 +100,9 @@ TEST(BasicBlockTest, TestInstructionsWithoutDebug) {
Argument *V = new Argument(Type::getInt32Ty(Ctx));
Function *F = Function::Create(FT, Function::ExternalLinkage, "", M);
- Value *DbgAddr = Intrinsic::getDeclaration(M, Intrinsic::dbg_addr);
- Value *DbgDeclare =
- Intrinsic::getDeclaration(M, Intrinsic::dbg_declare);
- Value *DbgValue = Intrinsic::getDeclaration(M, Intrinsic::dbg_value);
+ Function *DbgAddr = Intrinsic::getDeclaration(M, Intrinsic::dbg_addr);
+ Function *DbgDeclare = Intrinsic::getDeclaration(M, Intrinsic::dbg_declare);
+ Function *DbgValue = Intrinsic::getDeclaration(M, Intrinsic::dbg_value);
Value *DIV = MetadataAsValue::get(Ctx, (Metadata *)nullptr);
SmallVector<Value *, 3> Args = {DIV, DIV, DIV};
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp
index baf982f94fc..a20e495c873 100644
--- a/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/llvm/unittests/IR/IRBuilderTest.cpp
@@ -353,7 +353,7 @@ TEST_F(IRBuilderTest, FastMathFlags) {
FCall = Builder.CreateCall(Callee, None);
EXPECT_FALSE(FCall->hasNoNaNs());
- Value *V =
+ Function *V =
Function::Create(CalleeTy, Function::ExternalLinkage, "", M.get());
FCall = Builder.CreateCall(V, None);
EXPECT_FALSE(FCall->hasNoNaNs());
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp
index a28ba7a2e20..1f82d4b632c 100644
--- a/llvm/unittests/IR/InstructionsTest.cpp
+++ b/llvm/unittests/IR/InstructionsTest.cpp
@@ -504,14 +504,15 @@ TEST(InstructionsTest, CloneCall) {
LLVMContext C;
Type *Int32Ty = Type::getInt32Ty(C);
Type *ArgTys[] = {Int32Ty, Int32Ty, Int32Ty};
- Type *FnTy = FunctionType::get(Int32Ty, ArgTys, /*isVarArg=*/false);
+ FunctionType *FnTy = FunctionType::get(Int32Ty, ArgTys, /*isVarArg=*/false);
Value *Callee = Constant::getNullValue(FnTy->getPointerTo());
Value *Args[] = {
ConstantInt::get(Int32Ty, 1),
ConstantInt::get(Int32Ty, 2),
ConstantInt::get(Int32Ty, 3)
};
- std::unique_ptr<CallInst> Call(CallInst::Create(Callee, Args, "result"));
+ std::unique_ptr<CallInst> Call(
+ CallInst::Create(FnTy, Callee, Args, "result"));
// Test cloning the tail call kind.
CallInst::TailCallKind Kinds[] = {CallInst::TCK_None, CallInst::TCK_Tail,
@@ -537,12 +538,12 @@ TEST(InstructionsTest, CloneCall) {
TEST(InstructionsTest, AlterCallBundles) {
LLVMContext C;
Type *Int32Ty = Type::getInt32Ty(C);
- Type *FnTy = FunctionType::get(Int32Ty, Int32Ty, /*isVarArg=*/false);
+ FunctionType *FnTy = FunctionType::get(Int32Ty, Int32Ty, /*isVarArg=*/false);
Value *Callee = Constant::getNullValue(FnTy->getPointerTo());
Value *Args[] = {ConstantInt::get(Int32Ty, 42)};
OperandBundleDef OldBundle("before", UndefValue::get(Int32Ty));
std::unique_ptr<CallInst> Call(
- CallInst::Create(Callee, Args, OldBundle, "result"));
+ CallInst::Create(FnTy, Callee, Args, OldBundle, "result"));
Call->setTailCallKind(CallInst::TailCallKind::TCK_NoTail);
AttrBuilder AB;
AB.addAttribute(Attribute::Cold);
OpenPOWER on IntegriCloud