aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-04-14 21:41:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-06-22 18:20:56 +0000
commitbdd1243df58e60e85101c09001d9812a789b6bc4 (patch)
treea1ce621c7301dd47ba2ddc3b8eaa63b441389481 /contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
parent781624ca2d054430052c828ba8d2c2eaf2d733e7 (diff)
parente3b557809604d036af6e00c60f012c2025b59a5e (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp b/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
index 7443d49967c5..46ebbef4d9d2 100644
--- a/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
+++ b/contrib/llvm-project/llvm/lib/FuzzMutate/Operations.cpp
@@ -163,7 +163,7 @@ OpDescriptor llvm::fuzzerop::splitBlockDescriptor(unsigned Weight) {
SourcePred isInt1Ty{[](ArrayRef<Value *>, const Value *V) {
return V->getType()->isIntegerTy(1);
},
- None};
+ std::nullopt};
return {Weight, {isInt1Ty}, buildSplitBlock};
}
@@ -174,7 +174,7 @@ OpDescriptor llvm::fuzzerop::gepDescriptor(unsigned Weight) {
Type *Ty = Srcs[0]->getType()->isOpaquePointerTy()
? Srcs[1]->getType()
: Srcs[0]->getType()->getNonOpaquePointerElementType();
- auto Indices = makeArrayRef(Srcs).drop_front(2);
+ auto Indices = ArrayRef(Srcs).drop_front(2);
return GetElementPtrInst::Create(Ty, Srcs[0], Indices, "G", Inst);
};
// TODO: Handle aggregates and vectors
@@ -182,7 +182,7 @@ OpDescriptor llvm::fuzzerop::gepDescriptor(unsigned Weight) {
// TODO: Try to avoid meaningless accesses.
SourcePred sizedType(
[](ArrayRef<Value *>, const Value *V) { return V->getType()->isSized(); },
- None);
+ std::nullopt);
return {Weight, {sizedPtrType(), sizedType, anyIntType()}, buildGEP};
}
@@ -298,7 +298,7 @@ OpDescriptor llvm::fuzzerop::insertElementDescriptor(unsigned Weight) {
auto buildInsert = [](ArrayRef<Value *> Srcs, Instruction *Inst) {
return InsertElementInst::Create(Srcs[0], Srcs[1], Srcs[2], "I", Inst);
};
- // TODO: Try to avoid undefined accesses.
+ // TODO: Try to avoid undefined accesses.
return {Weight,
{anyVectorType(), matchScalarOfFirstType(), anyIntType()},
buildInsert};
@@ -313,8 +313,8 @@ static SourcePred validShuffleVectorIndex() {
auto *Int32Ty = Type::getInt32Ty(Cur[0]->getContext());
// TODO: It's straighforward to make up reasonable values, but listing them
// exhaustively would be insane. Come up with a couple of sensible ones.
- return std::vector<Constant *>{UndefValue::get(
- VectorType::get(Int32Ty, FirstTy->getElementCount()))};
+ return std::vector<Constant *>{
+ UndefValue::get(VectorType::get(Int32Ty, FirstTy->getElementCount()))};
};
return {Pred, Make};
}