aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/VectorUtils.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-25 21:42:52 -0700
committerKazu Hirata <kazu@google.com>2022-06-25 21:42:52 -0700
commita7938c74f16379704fbd38a3d82dfcb9345651ab (patch)
treec60b0dce73b749e64ab20d51ef00abfbc547857f /llvm/lib/Analysis/VectorUtils.cpp
parent77295c5486e48a4319efcfc4ac262304c7e7025c (diff)
downloadllvm-a7938c74f16379704fbd38a3d82dfcb9345651ab.zip
llvm-a7938c74f16379704fbd38a3d82dfcb9345651ab.tar.gz
llvm-a7938c74f16379704fbd38a3d82dfcb9345651ab.tar.bz2
[llvm] Don't use Optional::hasValue (NFC)
This patch replaces Optional::hasValue with the implicit cast to bool in conditionals only.
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r--llvm/lib/Analysis/VectorUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp
index beb14c4..f863a1f 100644
--- a/llvm/lib/Analysis/VectorUtils.cpp
+++ b/llvm/lib/Analysis/VectorUtils.cpp
@@ -1501,7 +1501,7 @@ void VFABI::getVectorVariantNames(
#ifndef NDEBUG
LLVM_DEBUG(dbgs() << "VFABI: adding mapping '" << S << "'\n");
Optional<VFInfo> Info = VFABI::tryDemangleForVFABI(S, *(CI.getModule()));
- assert(Info.hasValue() && "Invalid name for a VFABI variant.");
+ assert(Info && "Invalid name for a VFABI variant.");
assert(CI.getModule()->getFunction(Info.getValue().VectorName) &&
"Vector function is missing.");
#endif