aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-16 23:21:27 +0000
committerFangrui Song <i@maskray.me>2022-12-16 23:21:27 +0000
commit51b685734b0e185bca9d0eec66b3bcb636ed9c02 (patch)
tree1d3cf7527fef8d8023e8de1858ef42a350be2747 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentbe931f89451b650e081daf875213c19f658caf25 (diff)
downloadllvm-51b685734b0e185bca9d0eec66b3bcb636ed9c02.zip
llvm-51b685734b0e185bca9d0eec66b3bcb636ed9c02.tar.gz
llvm-51b685734b0e185bca9d0eec66b3bcb636ed9c02.tar.bz2
[Transforms,CodeGen] std::optional::value => operator*/operator->
value() has undesired exception checking semantics and calls __throw_bad_optional_access in libc++. Moreover, the API is unavailable without _LIBCPP_NO_EXCEPTIONS on older Mach-O platforms (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS).
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 7a377b4..ea522c6 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -456,8 +456,8 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST,
if (IrrLoopHeaderWeight && IsStandalone) {
if (Indexes) OS << '\t';
- OS.indent(2) << "; Irreducible loop header weight: "
- << IrrLoopHeaderWeight.value() << '\n';
+ OS.indent(2) << "; Irreducible loop header weight: " << *IrrLoopHeaderWeight
+ << '\n';
}
}