barannikov88 added inline comments.

================
Comment at: llvm/include/llvm/Support/CodeGen.h:67
+  inline std::optional<Level> getLevel(IDType ID) {
+    if (ID < 0 || ID > 3)
+      return std::nullopt;
----------------
As I can see, clients do not check for nullopt. Either add checks or replace 
this check with an assertion and drop std::optional (in this case `parseLevel` 
should be updated accordingly).




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141968

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to