diff options
author | Kazu Hirata <kazu@google.com> | 2022-06-26 16:10:42 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-06-26 16:10:42 -0700 |
commit | a81b64a1fbff689a37f55a9b5e44a66f5b7f9a5c (patch) | |
tree | 633953d8d93ee2a4dc542a71177f0bece8d7177a /llvm/lib/IR | |
parent | fadea4413ecbfffa4d28ad8298e0628165b543f1 (diff) | |
download | llvm-a81b64a1fbff689a37f55a9b5e44a66f5b7f9a5c.zip llvm-a81b64a1fbff689a37f55a9b5e44a66f5b7f9a5c.tar.gz llvm-a81b64a1fbff689a37f55a9b5e44a66f5b7f9a5c.tar.bz2 |
[llvm] Use Optional::has_value instead of Optional::hasValue (NFC)
This patch replaces x.hasValue() with x.has_value() where x is not
contextually convertible to bool.
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp index 40a1a89..06b3a3a 100644 --- a/llvm/lib/IR/LLVMContextImpl.cpp +++ b/llvm/lib/IR/LLVMContextImpl.cpp @@ -250,7 +250,7 @@ void LLVMContextImpl::setOptPassGate(OptPassGate& OPG) { } bool LLVMContextImpl::hasOpaquePointersValue() { - return OpaquePointers.hasValue(); + return OpaquePointers.has_value(); } bool LLVMContextImpl::getOpaquePointers() { diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 8f857933..cbdf1d1 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -5844,10 +5844,10 @@ void Verifier::visitConstrainedFPIntrinsic(ConstrainedFPIntrinsic &FPI) { // match the specification in the intrinsic call table. Thus, no // argument type check is needed here. - Check(FPI.getExceptionBehavior().hasValue(), + Check(FPI.getExceptionBehavior().has_value(), "invalid exception behavior argument", &FPI); if (HasRoundingMD) { - Check(FPI.getRoundingMode().hasValue(), "invalid rounding mode argument", + Check(FPI.getRoundingMode().has_value(), "invalid rounding mode argument", &FPI); } } |