[llvm] 10bab60 - [Utils] Use std::optional in Local.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 26 17:49:12 PST 2022
Author: Kazu Hirata
Date: 2022-11-26T17:49:07-08:00
New Revision: 10bab60ddbeb90a77c383de673cbc422171a6d09
URL: https://github.com/llvm/llvm-project/commit/10bab60ddbeb90a77c383de673cbc422171a6d09
DIFF: https://github.com/llvm/llvm-project/commit/10bab60ddbeb90a77c383de673cbc422171a6d09.diff
LOG: [Utils] Use std::optional in Local.cpp (NFC)
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
Added:
Modified:
llvm/lib/Transforms/Utils/Local.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 2e0b4b07b989..82501cdd31c0 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -80,6 +80,7 @@
#include <cstdint>
#include <iterator>
#include <map>
+#include <optional>
#include <utility>
using namespace llvm;
@@ -2048,7 +2049,7 @@ Value *llvm::salvageDebugInfoImpl(Instruction &I, uint64_t CurrentLocOps,
}
/// A replacement for a dbg.value expression.
-using DbgValReplacement = Optional<DIExpression *>;
+using DbgValReplacement = std::optional<DIExpression *>;
/// Point debug users of \p From to \p To using exprs given by \p RewriteExpr,
/// possibly moving/undefing users to prevent use-before-def. Returns true if
More information about the llvm-commits
mailing list