[llvm] 5a98e8c - [CodeView] Use std::optional in TypeStreamMerger.cpp (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 25 11:37:38 PST 2022


Author: Kazu Hirata
Date: 2022-11-25T11:37:32-08:00
New Revision: 5a98e8c520e6fde7c4557b0117a0da1929fcb881

URL: https://github.com/llvm/llvm-project/commit/5a98e8c520e6fde7c4557b0117a0da1929fcb881
DIFF: https://github.com/llvm/llvm-project/commit/5a98e8c520e6fde7c4557b0117a0da1929fcb881.diff

LOG: [CodeView] Use std::optional in TypeStreamMerger.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/DebugInfo/CodeView/TypeStreamMerger.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp b/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
index 5eb1cb1c254c4..fdc649439682d 100644
--- a/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
+++ b/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
@@ -17,6 +17,7 @@
 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
 #include "llvm/DebugInfo/CodeView/TypeRecordHelpers.h"
 #include "llvm/Support/Error.h"
+#include <optional>
 
 using namespace llvm;
 using namespace llvm::codeview;
@@ -167,7 +168,7 @@ class TypeStreamMerger {
 
   Expected<bool> shouldRemapType(const CVType &Type);
 
-  Optional<Error> LastError;
+  std::optional<Error> LastError;
 
   bool UseGlobalHashes = false;
 


        


More information about the llvm-commits mailing list