diff options
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/DebugInfoMetadata.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/VectorBuilder.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index b032a3f..8f7dad3 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -379,7 +379,7 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V, opc != Instruction::AddrSpaceCast && // Do not fold bitcast (gep) with inrange index, as this loses // information. - !cast<GEPOperator>(CE)->getInRangeIndex().hasValue() && + !cast<GEPOperator>(CE)->getInRangeIndex() && // Do not fold if the gep type is a vector, as bitcasting // operand 0 of a vector gep will result in a bitcast between // different sizes. diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp index 115a577..5079932 100644 --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -1582,7 +1582,7 @@ DIExpression *DIExpression::appendToStack(const DIExpression *Expr, // // Match .* DW_OP_stack_value (DW_OP_LLVM_fragment A B)?. Optional<FragmentInfo> FI = Expr->getFragmentInfo(); - unsigned DropUntilStackValue = FI.hasValue() ? 3 : 0; + unsigned DropUntilStackValue = FI ? 3 : 0; ArrayRef<uint64_t> ExprOpsBeforeFragment = Expr->getElements().drop_back(DropUntilStackValue); bool NeedsDeref = (Expr->getNumElements() > DropUntilStackValue) && diff --git a/llvm/lib/IR/VectorBuilder.cpp b/llvm/lib/IR/VectorBuilder.cpp index f6c59de..82995ce 100644 --- a/llvm/lib/IR/VectorBuilder.cpp +++ b/llvm/lib/IR/VectorBuilder.cpp @@ -64,7 +64,7 @@ Value *VectorBuilder::createVectorInstruction(unsigned Opcode, Type *ReturnTy, auto VLenPosOpt = VPIntrinsic::getVectorLengthParamPos(VPID); size_t NumInstParams = InstOpArray.size(); size_t NumVPParams = - NumInstParams + MaskPosOpt.hasValue() + VLenPosOpt.hasValue(); + NumInstParams + MaskPosOpt.has_value() + VLenPosOpt.has_value(); SmallVector<Value *, 6> IntrinParams; diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 0df0c32..8f857933 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -4887,7 +4887,7 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) { Optional<RoundingMode> RoundMode = convertStrToRoundingMode(cast<MDString>(MD)->getString()); - Check(RoundMode.hasValue() && RoundMode.getValue() != RoundingMode::Dynamic, + Check(RoundMode && *RoundMode != RoundingMode::Dynamic, "unsupported rounding mode argument", Call); break; } @@ -6067,7 +6067,7 @@ void Verifier::verifyAttachedCallBundle(const CallBase &Call, } void Verifier::verifySourceDebugInfo(const DICompileUnit &U, const DIFile &F) { - bool HasSource = F.getSource().hasValue(); + bool HasSource = F.getSource().has_value(); if (!HasSourceDebugInfo.count(&U)) HasSourceDebugInfo[&U] = HasSource; CheckDI(HasSource == HasSourceDebugInfo[&U], |