Skip to content

Commit 5ecd21a

Browse files
authored
[NFC] Make unwind table internal data structures more accessible (#145804)
All these changes are being used in [PR#145633](#145633) `CFIProgram`: - `addInstruction` methods already exists, but more convenient ones are private, this PR makes them public `UnwindLocation`: - Added a field accessor method for `Dereference` like other field access methods.
1 parent c43282a commit 5ecd21a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ class UnwindLocation {
138138
return *AddrSpace;
139139
}
140140
int32_t getConstant() const { return Offset; }
141+
bool getDereference() const { return Dereference; }
142+
141143
/// Some opcodes will modify the CFA location's register only, so we need
142144
/// to be able to modify the CFA register when evaluating DWARF Call Frame
143145
/// Information opcodes.

llvm/include/llvm/DebugInfo/DWARF/LowLevel/DWARFCFIProgram.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,6 @@ class CFIProgram {
254254
/// above. This is indexed by opcode.
255255
LLVM_ABI static ArrayRef<OperandType[MaxOperands]> getOperandTypes();
256256

257-
private:
258-
std::vector<Instruction> Instructions;
259-
const uint64_t CodeAlignmentFactor;
260-
const int64_t DataAlignmentFactor;
261-
Triple::ArchType Arch;
262-
263257
/// Convenience method to add a new instruction with the given opcode.
264258
void addInstruction(uint8_t Opcode) {
265259
Instructions.push_back(Instruction(Opcode));
@@ -286,6 +280,12 @@ class CFIProgram {
286280
Instructions.back().Ops.push_back(Operand2);
287281
Instructions.back().Ops.push_back(Operand3);
288282
}
283+
284+
private:
285+
std::vector<Instruction> Instructions;
286+
const uint64_t CodeAlignmentFactor;
287+
const int64_t DataAlignmentFactor;
288+
Triple::ArchType Arch;
289289
};
290290

291291
} // end namespace dwarf

0 commit comments

Comments
 (0)