diff options
author | Kazu Hirata <kazu@google.com> | 2022-06-20 20:17:57 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-06-20 20:17:57 -0700 |
commit | 0916d96d12fda355933a8f66ed2a1ccc855cab9c (patch) | |
tree | b947652ee49c65ae7b4fd30376804749b4de7f29 /llvm/lib/IR/ConstantFold.cpp | |
parent | 064a08cd955019da9130f1109bfa534e79b8ec7c (diff) | |
download | llvm-0916d96d12fda355933a8f66ed2a1ccc855cab9c.zip llvm-0916d96d12fda355933a8f66ed2a1ccc855cab9c.tar.gz llvm-0916d96d12fda355933a8f66ed2a1ccc855cab9c.tar.bz2 |
Don't use Optional::hasValue (NFC)
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 2 |
1 files changed, 1 insertions, 1 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. |