[llvm-jitlink] Use std::optional::value_or (NFC) (#140173)

This commit is contained in:
Kazu Hirata
2025-05-15 23:29:15 -07:00
committed by GitHub
parent 0f0fd6213e
commit 5ca94f92fb

View File

@@ -1243,7 +1243,7 @@ Session::Session(std::unique_ptr<ExecutorProcessControl> EPC, Error &Err)
if ((Err = ES.getBootstrapMapValue<bool, bool>("darwin-use-ehframes-only",
ForceEHFrames)))
return;
bool UseEHFrames = ForceEHFrames ? *ForceEHFrames : false;
bool UseEHFrames = ForceEHFrames.value_or(false);
if (!UseEHFrames)
ObjLayer.addPlugin(ExitOnErr(UnwindInfoRegistrationPlugin::Create(ES)));
else