@@ -25,7 +25,7 @@ using namespace llvm;
2525using namespace dwarf ;
2626
2727void CFIPrinter::print (const CFIProgram &P, raw_ostream &OS,
28- DIDumpOptions DumpOpts, unsigned IndentLevel,
28+ DIDumpOptions & DumpOpts, unsigned IndentLevel,
2929 std::optional<uint64_t > Address) {
3030 for (const auto &Instr : P) {
3131 uint8_t Opcode = Instr.Opcode ;
@@ -37,7 +37,7 @@ void CFIPrinter::print(const CFIProgram &P, raw_ostream &OS,
3737 }
3838}
3939
40- static void printRegister (raw_ostream &OS, DIDumpOptions DumpOpts,
40+ static void printRegister (raw_ostream &OS, DIDumpOptions & DumpOpts,
4141 unsigned RegNum) {
4242 if (DumpOpts.GetNameForDWARFReg ) {
4343 auto RegName = DumpOpts.GetNameForDWARFReg (RegNum, DumpOpts.IsEH );
@@ -50,7 +50,7 @@ static void printRegister(raw_ostream &OS, DIDumpOptions DumpOpts,
5050}
5151
5252// / Print \p Opcode's operand number \p OperandIdx which has value \p Operand.
53- void CFIPrinter::printOperand (raw_ostream &OS, DIDumpOptions DumpOpts,
53+ void CFIPrinter::printOperand (raw_ostream &OS, DIDumpOptions & DumpOpts,
5454 const CFIProgram &P,
5555 const CFIProgram::Instruction &Instr,
5656 unsigned OperandIdx, uint64_t Operand,
@@ -82,24 +82,24 @@ void CFIPrinter::printOperand(raw_ostream &OS, DIDumpOptions DumpOpts,
8282 OS << format (" %+" PRId64, int64_t (Operand));
8383 break ;
8484 case CFIProgram::OT_FactoredCodeOffset: // Always Unsigned
85- if (P.CodeAlignmentFactor )
86- OS << format (" %" PRId64, Operand * P.CodeAlignmentFactor );
85+ if (P.codeAlign () )
86+ OS << format (" %" PRId64, Operand * P.codeAlign () );
8787 else
8888 OS << format (" %" PRId64 " *code_alignment_factor" , Operand);
89- if (Address && P.CodeAlignmentFactor ) {
90- *Address += Operand * P.CodeAlignmentFactor ;
89+ if (Address && P.codeAlign () ) {
90+ *Address += Operand * P.codeAlign () ;
9191 OS << format (" to 0x%" PRIx64, *Address);
9292 }
9393 break ;
9494 case CFIProgram::OT_SignedFactDataOffset:
95- if (P.DataAlignmentFactor )
96- OS << format (" %" PRId64, int64_t (Operand) * P.DataAlignmentFactor );
95+ if (P.dataAlign () )
96+ OS << format (" %" PRId64, int64_t (Operand) * P.dataAlign () );
9797 else
9898 OS << format (" %" PRId64 " *data_alignment_factor" , int64_t (Operand));
9999 break ;
100100 case CFIProgram::OT_UnsignedFactDataOffset:
101- if (P.DataAlignmentFactor )
102- OS << format (" %" PRId64, Operand * P.DataAlignmentFactor );
101+ if (P.dataAlign () )
102+ OS << format (" %" PRId64, Operand * P.dataAlign () );
103103 else
104104 OS << format (" %" PRId64 " *data_alignment_factor" , Operand);
105105 break ;
0 commit comments