Skip to content

[BOLT] Use AsmInfo for address size. NFCI #115932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2024
Merged

[BOLT] Use AsmInfo for address size. NFCI #115932

merged 1 commit into from
Nov 12, 2024

Conversation

maksfb
Copy link
Contributor

@maksfb maksfb commented Nov 12, 2024

Use AsmInfo instead of DWARFObj interface for extracting address size and format.

Use AsmInfo instead of DWARFObj interface for extracting address size
and format.
@llvmbot
Copy link
Member

llvmbot commented Nov 12, 2024

@llvm/pr-subscribers-bolt

Author: Maksim Panchenko (maksfb)

Changes

Use AsmInfo instead of DWARFObj interface for extracting address size and format.


Full diff: https://github.com/llvm/llvm-project/pull/115932.diff

1 Files Affected:

  • (modified) bolt/lib/Core/Exceptions.cpp (+1-2)
diff --git a/bolt/lib/Core/Exceptions.cpp b/bolt/lib/Core/Exceptions.cpp
index 6a46a49a983d8b..8c55d18bc1e115 100644
--- a/bolt/lib/Core/Exceptions.cpp
+++ b/bolt/lib/Core/Exceptions.cpp
@@ -108,8 +108,7 @@ Error BinaryFunction::parseLSDA(ArrayRef<uint8_t> LSDASectionData,
   DWARFDataExtractor Data(
       StringRef(reinterpret_cast<const char *>(LSDASectionData.data()),
                 LSDASectionData.size()),
-      BC.DwCtx->getDWARFObj().isLittleEndian(),
-      BC.DwCtx->getDWARFObj().getAddressSize());
+      BC.AsmInfo->isLittleEndian(), BC.AsmInfo->getCodePointerSize());
   uint64_t Offset = getLSDAAddress() - LSDASectionAddress;
   assert(Data.isValidOffset(Offset) && "wrong LSDA address");
 

@maksfb maksfb merged commit d922045 into llvm:main Nov 12, 2024
7 of 8 checks passed
@maksfb maksfb deleted the gh-asminfo branch March 6, 2025 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants