From b4482f7ca04e852cf610ef0e16542c888844d93d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 2 Dec 2022 21:11:40 -0800 Subject: [tools] 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 --- llvm/tools/llvm-cov/CodeCoverage.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp') diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index fe35d89..63732fa 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -559,9 +559,10 @@ void CodeCoverageTool::demangleSymbols(const CoverageMapping &Coverage) { std::optional Redirects[] = { InputPath.str(), OutputPath.str(), {""}}; std::string ErrMsg; - int RC = sys::ExecuteAndWait(ViewOpts.DemanglerOpts[0], ArgsV, - /*env=*/None, Redirects, /*secondsToWait=*/0, - /*memoryLimit=*/0, &ErrMsg); + int RC = + sys::ExecuteAndWait(ViewOpts.DemanglerOpts[0], ArgsV, + /*env=*/std::nullopt, Redirects, /*secondsToWait=*/0, + /*memoryLimit=*/0, &ErrMsg); if (RC) { error(ErrMsg, ViewOpts.DemanglerOpts[0]); return; -- cgit v1.1