[llvm] 11b75f9 - [Support] Use std::optional in ARMAttributeParser.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 21:22:24 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T21:22:19-08:00
New Revision: 11b75f952cf18454b6c6f9a399697279c369d1a0
URL: https://github.com/llvm/llvm-project/commit/11b75f952cf18454b6c6f9a399697279c369d1a0
DIFF: https://github.com/llvm/llvm-project/commit/11b75f952cf18454b6c6f9a399697279c369d1a0.diff
LOG: [Support] Use std::optional in ARMAttributeParser.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/Support/ARMAttributeParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/ARMAttributeParser.cpp b/llvm/lib/Support/ARMAttributeParser.cpp
index a89be63247e91..26a35b2a8d108 100644
--- a/llvm/lib/Support/ARMAttributeParser.cpp
+++ b/llvm/lib/Support/ARMAttributeParser.cpp
@@ -11,6 +11,7 @@
#include "llvm/Support/ARMBuildAttributes.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/ScopedPrinter.h"
+#include <optional>
using namespace llvm;
using namespace llvm::ARMBuildAttrs;
@@ -385,7 +386,7 @@ Error ARMAttributeParser::nodefaults(AttrType tag) {
Error ARMAttributeParser::also_compatible_with(AttrType tag) {
// Parse value as a C string first in order to print it in escaped form later.
// Then, parse it again to catch errors or to pretty print if Tag_CPU_arch.
- Optional<Error> returnValue;
+ std::optional<Error> returnValue;
SmallString<8> Description;
raw_svector_ostream DescStream(Description);
More information about the llvm-commits
mailing list