[llvm] 185f647 - [AArch64] Use std::optional in AArch64LowerHomogeneousPrologEpilog.cpp (NFC)

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


Author: Kazu Hirata
Date: 2022-11-25T22:11:32-08:00
New Revision: 185f647bb6289c6d93a19aeb5c7e00753497622b

URL: https://github.com/llvm/llvm-project/commit/185f647bb6289c6d93a19aeb5c7e00753497622b
DIFF: https://github.com/llvm/llvm-project/commit/185f647bb6289c6d93a19aeb5c7e00753497622b.diff

LOG: [AArch64] Use std::optional in AArch64LowerHomogeneousPrologEpilog.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/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp b/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
index a8f24f486903..351b6abf870c 100644
--- a/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
+++ b/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
@@ -26,6 +26,7 @@
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/raw_ostream.h"
+#include <optional>
 #include <sstream>
 
 using namespace llvm;
@@ -507,7 +508,7 @@ bool AArch64LowerHomogeneousPE::lowerProlog(
   DebugLoc DL = MI.getDebugLoc();
   SmallVector<unsigned, 8> Regs;
   int LRIdx = 0;
-  Optional<int> FpOffset;
+  std::optional<int> FpOffset;
   for (auto &MO : MI.operands()) {
     if (MO.isReg()) {
       if (MO.getReg() == AArch64::LR)


        


More information about the llvm-commits mailing list