[all-commits] [llvm/llvm-project] d8bbfe: [DWARF] Expose raw bytes in DWARFExpression

Rafael Auler via All-commits all-commits at lists.llvm.org
Wed Aug 18 14:58:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d8bbfe8a489780bf3536e098aa1220035a0f77bb
      https://github.com/llvm/llvm-project/commit/d8bbfe8a489780bf3536e098aa1220035a0f77bb
  Author: Rafael Auler <rafaelauler at fb.com>
  Date:   2021-08-18 (Wed, 18 Aug 2021)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
    M llvm/unittests/DebugInfo/DWARF/CMakeLists.txt
    A llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp

  Log Message:
  -----------
  [DWARF] Expose raw bytes in DWARFExpression

This information is necessary for clients of DebugInfo that
do not want to process a DWARF expression, but just treat it as a blob
of data. In BOLT, for example, we need to read these expressions in
CFIs and write them back to the binary, unchanged, so having access to
the original expression encoding is a shortcut to avoid the need to
re-encode the entire expression when re-writing exception handling
info (CFIs).

This patch is an alternative to https://reviews.llvm.org/D98301, in
which we implement the support to re-encode these expressions. But
since we don't really need to change anything in these expressions,
we can just copy their bytes.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D107515




More information about the All-commits mailing list