[lld] [LLD][ELF][AArch64] Add BTI Aware long branch thunks (PR #108989)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 22:43:52 PDT 2024
================
@@ -2265,6 +2265,15 @@ std::pair<Thunk *, bool> ThunkCreator::getThunk(InputSection *isec,
return std::make_pair(t, true);
}
+std::pair<Thunk *, bool> ThunkCreator::getSyntheticLandingPad(Defined &d,
+ int64_t a) {
+ auto [it, isNew] = landingPadsBySectionAndAddend.try_emplace(
+ {{d.section, d.value}, a}, nullptr);
+ if (isNew)
+ it->second = addLandingPadThunk(ctx, d, a);
+ return std::make_pair(it->second, isNew);
----------------
MaskRay wrote:
`{it->second, isNew}` is more idiomatic post C++11
https://github.com/llvm/llvm-project/pull/108989
More information about the llvm-commits
mailing list