-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[NFC] Separate UnwindTable from DebugFrame into a different file #142521
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
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
055492d
Remove UnwindTable dependency on CIE, and FDE (transitively on llvm/O…
5c807f2
Annotate the extracted UnwindTable creators with LLVM ABI
aac505a
Remove UnwindTable dependency on CIE, and FDE (transitively on llvm/O…
f75586c
Separate UnwindTable from DWARF Debug Frame
80ac83c
Annotate UnwindTable exported API with LLVM_ABI
8a4f861
Annotate exported API of DebugFrame with LLVM_ABI
637290f
Merge branch 'main' into unwind-table-separation
fbadafc
Redo the separation with the updates
3ca3eb6
Merge branch 'main' into unwind-table-separation
1b6686a
Use the new expression printer function
571edd8
Lint
c9f6249
Merge branch 'main' into unwind-table-separation
5d34629
Merge main
682dcae
Lint
1ed0df2
[TEMP] move unwind table to where it should be, the layering is not c…
4042154
Move the printing logic of UnwindTable to UnwindTablePrinter
87f41c8
Lint
0b7a2c6
Merge branch 'main' into unwind-table-separation
amsen20 859bfb6
Remove unnecessary print functions from library
amsen20 b7b47cd
Fix header guards match folder paths
amsen20 55e98e6
Sync new file header with new style
amsen20 272d28b
Match starting docs for cpp files with new style guide
amsen20 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
102 changes: 102 additions & 0 deletions
102
llvm/include/llvm/DebugInfo/DWARF/DWARFUnwindTablePrinter.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| //===- DWARFUnwindTablePrinter.h --------------------------------*- C++ -*-===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #ifndef LLVM_DEBUGINFO_DWARF_DWARFUNWINDTABLEPRINTER_H | ||
| #define LLVM_DEBUGINFO_DWARF_DWARFUNWINDTABLEPRINTER_H | ||
|
|
||
| #include "llvm/DebugInfo/DWARF/LowLevel/DWARFUnwindTable.h" | ||
| #include "llvm/Support/Compiler.h" | ||
|
|
||
| namespace llvm { | ||
|
|
||
| struct DIDumpOptions; | ||
|
|
||
| namespace dwarf { | ||
|
|
||
| /// Print an unwind location expression as text and use the register information | ||
| /// if some is provided. | ||
| /// | ||
| /// \param R the unwind location to print. | ||
| /// | ||
| /// \param OS the stream to use for output. | ||
| /// | ||
| /// \param MRI register information that helps emit register names insteead | ||
| /// of raw register numbers. | ||
| /// | ||
| /// \param IsEH true if the DWARF Call Frame Information is from .eh_frame | ||
| /// instead of from .debug_frame. This is needed for register number | ||
| /// conversion because some register numbers differ between the two sections | ||
| /// for certain architectures like x86. | ||
| LLVM_ABI void printUnwindLocation(const UnwindLocation &R, raw_ostream &OS, | ||
| DIDumpOptions DumpOpts); | ||
| LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const UnwindLocation &R); | ||
|
|
||
| /// Print all registers + locations that are currently defined in a register | ||
| /// locations. | ||
| /// | ||
| /// \param RL the register locations to print. | ||
| /// | ||
| /// \param OS the stream to use for output. | ||
| /// | ||
| /// \param MRI register information that helps emit register names insteead | ||
| /// of raw register numbers. | ||
| /// | ||
| /// \param IsEH true if the DWARF Call Frame Information is from .eh_frame | ||
| /// instead of from .debug_frame. This is needed for register number | ||
| /// conversion because some register numbers differ between the two sections | ||
| /// for certain architectures like x86. | ||
| LLVM_ABI void printRegisterLocations(const RegisterLocations &RL, | ||
| raw_ostream &OS, DIDumpOptions DumpOpts); | ||
| LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const RegisterLocations &RL); | ||
|
|
||
| /// Print an UnwindRow to the stream. | ||
| /// | ||
| /// \param Row the UnwindRow to print. | ||
| /// | ||
| /// \param OS the stream to use for output. | ||
| /// | ||
| /// \param MRI register information that helps emit register names insteead | ||
| /// of raw register numbers. | ||
| /// | ||
| /// \param IsEH true if the DWARF Call Frame Information is from .eh_frame | ||
| /// instead of from .debug_frame. This is needed for register number | ||
| /// conversion because some register numbers differ between the two sections | ||
| /// for certain architectures like x86. | ||
| /// | ||
| /// \param IndentLevel specify the indent level as an integer. The UnwindRow | ||
| /// will be output to the stream preceded by 2 * IndentLevel number of spaces. | ||
| LLVM_ABI void printUnwindRow(const UnwindRow &Row, raw_ostream &OS, | ||
| DIDumpOptions DumpOpts, unsigned IndentLevel = 0); | ||
| LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const UnwindRow &Row); | ||
|
|
||
| /// Print a UnwindTable to the stream. | ||
| /// | ||
| /// \param Rows the UnwindTable to print. | ||
| /// | ||
| /// \param OS the stream to use for output. | ||
| /// | ||
| /// \param MRI register information that helps emit register names instead | ||
| /// of raw register numbers. | ||
| /// | ||
| /// \param IsEH true if the DWARF Call Frame Information is from .eh_frame | ||
| /// instead of from .debug_frame. This is needed for register number | ||
| /// conversion because some register numbers differ between the two sections | ||
| /// for certain architectures like x86. | ||
| /// | ||
| /// \param IndentLevel specify the indent level as an integer. The UnwindRow | ||
| /// will be output to the stream preceded by 2 * IndentLevel number of spaces. | ||
| LLVM_ABI void printUnwindTable(const UnwindTable &Rows, raw_ostream &OS, | ||
| DIDumpOptions DumpOpts, | ||
| unsigned IndentLevel = 0); | ||
| LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const UnwindTable &Rows); | ||
|
|
||
| } // end namespace dwarf | ||
|
|
||
| } // end namespace llvm | ||
|
|
||
| #endif // LLVM_DEBUGINFO_DWARF_DWARFUNWINDTABLEPRINTER_H | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.