forked from OSchip/llvm-project
Make HasWinCFI a plain bool instead of Optional<bool>
Summary: Reid suggested making HasWinCFI a plain bool defaulting to false in D50288. It's needed in order to add HasWinCFI to MIRPrinter. Otherwise, we'll get the assertion: HasWinCFI.hasValue() && "HasWinCFI not set yet!"' Also, a few ARM64 Windows test cases will fail with the same assert if the ARM64 MCLayer part of EH work (D50166) goes in before the frame lowering part that sets HasWinCFI (D50288 as of now). Reviewers: rnk, mstorsjo, hans, javed.absar Reviewed By: rnk Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D51560 llvm-svn: 341270
This commit is contained in:
parent
f5297fb24b
commit
61ddb7df82
|
@ -294,7 +294,7 @@ class MachineFunction {
|
|||
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 @@ public:
|
|||
}
|
||||
|
||||
bool hasWinCFI() const {
|
||||
assert(HasWinCFI.hasValue() && "HasWinCFI not set yet!");
|
||||
return *HasWinCFI;
|
||||
return HasWinCFI;
|
||||
}
|
||||
void setHasWinCFI(bool v) { HasWinCFI = v; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue