[PATCH] D51560: Make HasWinCFI a plain bool instead of Optional<bool>

Sanjin Sijaric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 31 17:34:54 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL341270: Make HasWinCFI a plain bool instead of Optional<bool> (authored by ssijaric, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D51560?vs=163599&id=163611#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51560

Files:
  llvm/trunk/include/llvm/CodeGen/MachineFunction.h


Index: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
===================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h
@@ -294,7 +294,7 @@
   bool HasInlineAsm = false;
 
   /// True if any WinCFI instruction have been emitted in this function.
-  Optional<bool> HasWinCFI;
+  bool HasWinCFI = false;
 
   /// Current high-level properties of the IR of the function (e.g. is in SSA
   /// form or whether registers have been allocated)
@@ -484,8 +484,7 @@
   }
 
   bool hasWinCFI() const {
-    assert(HasWinCFI.hasValue() && "HasWinCFI not set yet!");
-    return *HasWinCFI;
+    return HasWinCFI;
   }
   void setHasWinCFI(bool v) { HasWinCFI = v; }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51560.163611.patch
Type: text/x-patch
Size: 770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180901/69a52eb0/attachment.bin>


More information about the llvm-commits mailing list