diff options
author | Fangrui Song <i@maskray.me> | 2022-12-17 06:37:59 +0000 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-12-17 06:37:59 +0000 |
commit | 53e5cd4d3e39dad47312a48d4c6c71318bb2c283 (patch) | |
tree | 808d8a35b84061021fe7896084ece92bb470ba2a /polly | |
parent | 40ba0942e2ab1107f83aa5a0ee5ae2980bf47b1a (diff) | |
download | llvm-53e5cd4d3e39dad47312a48d4c6c71318bb2c283.zip llvm-53e5cd4d3e39dad47312a48d4c6c71318bb2c283.tar.gz llvm-53e5cd4d3e39dad47312a48d4c6c71318bb2c283.tar.bz2 |
llvm::Optional::value => operator*/operator->
std::optional::value() has undesired exception checking semantics and is
unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). The
call sites block std::optional migration.
This makes `ninja clang` work in the absence of llvm::Optional::value.
Diffstat (limited to 'polly')
-rw-r--r-- | polly/lib/Transform/ManualOptimizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/polly/lib/Transform/ManualOptimizer.cpp b/polly/lib/Transform/ManualOptimizer.cpp index 382bcd6..f6d0ef2 100644 --- a/polly/lib/Transform/ManualOptimizer.cpp +++ b/polly/lib/Transform/ManualOptimizer.cpp @@ -43,7 +43,7 @@ static TransformationMode hasUnrollTransformation(MDNode *LoopID) { Optional<int> Count = getOptionalIntLoopAttribute(LoopID, "llvm.loop.unroll.count"); if (Count) - return Count.value() == 1 ? TM_SuppressedByUser : TM_ForcedByUser; + return *Count == 1 ? TM_SuppressedByUser : TM_ForcedByUser; if (getBooleanLoopAttribute(LoopID, "llvm.loop.unroll.enable")) return TM_ForcedByUser; |