diff options
author | Fangrui Song <i@maskray.me> | 2022-12-16 22:57:55 +0000 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-12-16 22:57:56 +0000 |
commit | fb8eb84e5fd0b3219bd89522cceee3a8e128a85f (patch) | |
tree | 39fd35032d16004218385bda66de4002e2839e0c /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | 2fa744e631cbabe583da010ec56560edbc7a5384 (diff) | |
download | llvm-fb8eb84e5fd0b3219bd89522cceee3a8e128a85f.zip llvm-fb8eb84e5fd0b3219bd89522cceee3a8e128a85f.tar.gz llvm-fb8eb84e5fd0b3219bd89522cceee3a8e128a85f.tar.bz2 |
[Transforms,InstCombine] 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/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index a6c32a1..b19156b 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -403,7 +403,7 @@ CloneLoopBlocks(Loop *L, Value *NewIter, const bool UseEpilogRemainder, std::optional<MDNode *> NewLoopID = makeFollowupLoopID( LoopID, {LLVMLoopUnrollFollowupAll, LLVMLoopUnrollFollowupRemainder}); if (NewLoopID) { - NewLoop->setLoopID(NewLoopID.value()); + NewLoop->setLoopID(*NewLoopID); // Do not setLoopAlreadyUnrolled if loop attributes have been defined // explicitly. |