aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-mca
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-17 01:42:39 +0000
committerFangrui Song <i@maskray.me>2022-12-17 01:42:39 +0000
commit67ba5c507af2264ff79e4948b976477929436e86 (patch)
tree348168ed615f4ad4955b4870c6a1b49283288f87 /llvm/tools/llvm-mca
parent6d1d055fad502e0751d59c31ca915737b73e002f (diff)
downloadllvm-67ba5c507af2264ff79e4948b976477929436e86.zip
llvm-67ba5c507af2264ff79e4948b976477929436e86.tar.gz
llvm-67ba5c507af2264ff79e4948b976477929436e86.tar.bz2
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). This fixes check-llvm.
Diffstat (limited to 'llvm/tools/llvm-mca')
-rw-r--r--llvm/tools/llvm-mca/Views/InstructionInfoView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mca/Views/InstructionInfoView.cpp b/llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
index d3f9738..257fdca 100644
--- a/llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
+++ b/llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
@@ -71,7 +71,7 @@ void InstructionInfoView::printView(raw_ostream &OS) const {
TempStream << ' ';
if (IIVDEntry.RThroughput) {
- double RT = IIVDEntry.RThroughput.value();
+ double RT = *IIVDEntry.RThroughput;
TempStream << format("%.2f", RT) << ' ';
if (RT < 10.0)
TempStream << " ";