Skip to content

[NFC] Make unwind table internal data structures more accessible #145804

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions llvm/include/llvm/DebugInfo/DWARF/DWARFCFIProgram.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ class CFIProgram {
/// above. This is indexed by opcode.
LLVM_ABI static ArrayRef<OperandType[MaxOperands]> getOperandTypes();

private:
std::vector<Instruction> Instructions;
const uint64_t CodeAlignmentFactor;
const int64_t DataAlignmentFactor;
Triple::ArchType Arch;

/// Convenience method to add a new instruction with the given opcode.
void addInstruction(uint8_t Opcode) {
Instructions.push_back(Instruction(Opcode));
Expand All @@ -144,6 +138,12 @@ class CFIProgram {
Instructions.back().Ops.push_back(Operand2);
Instructions.back().Ops.push_back(Operand3);
}

private:
std::vector<Instruction> Instructions;
const uint64_t CodeAlignmentFactor;
const int64_t DataAlignmentFactor;
Triple::ArchType Arch;
};

} // end namespace dwarf
Expand Down
2 changes: 2 additions & 0 deletions llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ class UnwindLocation {
return *AddrSpace;
}
int32_t getConstant() const { return Offset; }
bool getDereference() const { return Dereference; }

/// Some opcodes will modify the CFA location's register only, so we need
/// to be able to modify the CFA register when evaluating DWARF Call Frame
/// Information opcodes.
Expand Down