summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjin Sijaric <ssijaric@codeaurora.org>2018-09-01 00:33:43 +0000
committerSanjin Sijaric <ssijaric@codeaurora.org>2018-09-01 00:33:43 +0000
commit61ddb7df82361db6e30bcfa8b6ceada40a37c34b (patch)
tree5f72944529dfa8c1fcb2cf048844830d40d7bd84
parentf5297fb24bf0f21653e3fa855beb0a9e2ce81082 (diff)
downloadbcm5719-llvm-61ddb7df82361db6e30bcfa8b6ceada40a37c34b.tar.gz
bcm5719-llvm-61ddb7df82361db6e30bcfa8b6ceada40a37c34b.zip
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
-rw-r--r--llvm/include/llvm/CodeGen/MachineFunction.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h
index 7639012f224..1083e397c2a 100644
--- a/llvm/include/llvm/CodeGen/MachineFunction.h
+++ b/llvm/include/llvm/CodeGen/MachineFunction.h
@@ -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; }
OpenPOWER on IntegriCloud