aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-02 22:10:37 -0800
committerKazu Hirata <kazu@google.com>2022-12-02 22:10:37 -0800
commitb6a01caa64aaac2e5db8d7953a81cbe1a139b81f (patch)
tree1e03e63b8c985d3b1ca515ac811a87e31e6afef0 /llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp
parentb25362816d731ca2283b3b21ca7343a64c05d85c (diff)
downloadllvm-b6a01caa64aaac2e5db8d7953a81cbe1a139b81f.zip
llvm-b6a01caa64aaac2e5db8d7953a81cbe1a139b81f.tar.gz
llvm-b6a01caa64aaac2e5db8d7953a81cbe1a139b81f.tar.bz2
[llvm/unittests] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp')
-rw-r--r--llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp b/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp
index d9247e4..617ff7b 100644
--- a/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp
+++ b/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp
@@ -34,9 +34,9 @@ std::unique_ptr<LLVMTargetMachine> createTargetMachine() {
const Target *TheTarget = TargetRegistry::lookupTarget(TT, Error);
assert(TheTarget);
- return std::unique_ptr<LLVMTargetMachine>(static_cast<LLVMTargetMachine*>(
- TheTarget->createTargetMachine(TT, CPU, FS, TargetOptions(), None, None,
- CodeGenOpt::Default)));
+ return std::unique_ptr<LLVMTargetMachine>(static_cast<LLVMTargetMachine *>(
+ TheTarget->createTargetMachine(TT, CPU, FS, TargetOptions(), std::nullopt,
+ std::nullopt, CodeGenOpt::Default)));
}
std::unique_ptr<Module> parseMIR(LLVMContext &Context,