[PATCH] D150229: [bolt] Fix typo in BinaryFunction::parseLSDA
Richard Dzenis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 14:52:04 PDT 2023
RIscRIpt created this revision.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
RIscRIpt requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
According to `EHStreamer::emitExceptionTable` LLVM emits absptr
address in non-PIC case. Otherwise, LLVM emits pcrel offset.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150229
Files:
bolt/lib/Core/Exceptions.cpp
Index: bolt/lib/Core/Exceptions.cpp
===================================================================
--- bolt/lib/Core/Exceptions.cpp
+++ bolt/lib/Core/Exceptions.cpp
@@ -114,11 +114,11 @@
uint8_t LPStartEncoding = Data.getU8(&Offset);
uint64_t LPStart = 0;
- // Convert to offset if LPStartEncoding is typed absptr DW_EH_PE_absptr
+ // Convert to offset if LPStartEncoding is absptr (non-PIC case)
if (std::optional<uint64_t> MaybeLPStart = Data.getEncodedPointer(
&Offset, LPStartEncoding, Offset + LSDASectionAddress))
- LPStart = (LPStartEncoding && 0xFF == 0) ? *MaybeLPStart
- : *MaybeLPStart - Address;
+ LPStart = LPStartEncoding == DW_EH_PE_absptr ? *MaybeLPStart - Address
+ : *MaybeLPStart;
const uint8_t TTypeEncoding = Data.getU8(&Offset);
LSDATypeEncoding = TTypeEncoding;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150229.520828.patch
Type: text/x-patch
Size: 920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230509/152d9e45/attachment.bin>
More information about the llvm-commits
mailing list