[PATCH] D145206: [NFC] Properly handle optional minor value for ArchInfo::Version

Zixu Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 17:28:42 PST 2023


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd7623507ac25: [NFC] Properly handle optional minor value for ArchInfo::Version (authored by zixuw).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145206/new/

https://reviews.llvm.org/D145206

Files:
  llvm/include/llvm/TargetParser/AArch64TargetParser.h


Index: llvm/include/llvm/TargetParser/AArch64TargetParser.h
===================================================================
--- llvm/include/llvm/TargetParser/AArch64TargetParser.h
+++ llvm/include/llvm/TargetParser/AArch64TargetParser.h
@@ -288,8 +288,8 @@
       return this->Version > Other.Version;
     }
     if (this->Version.getMajor() == 9 && Other.Version.getMajor() == 8) {
-      return this->Version.getMinor().value() + 5 >=
-             Other.Version.getMinor().value();
+      return this->Version.getMinor().value_or(0) + 5 >=
+             Other.Version.getMinor().value_or(0);
     }
     return false;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145206.502029.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230303/7cf36d1e/attachment.bin>


More information about the llvm-commits mailing list