mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
[MCDwarf] Do not emit useless line table opcode.
No need to emit a DW_LNS_advance_pc with a 0 increment. Found out while comparing dsymutil's and LLVM's line table encoding. Not a correctenss fix, just a small encoding size optimization. I'm not sure how to generate a sequence that triggers this, and moreover llvm-dwardump doesn't dump the line table program, thus the effort involved in creating a testcase for this trivial patch seemed out of proportion. llvm-svn: 232332
This commit is contained in:
parent
449078e945
commit
2065721bd8
@ -446,7 +446,7 @@ void MCDwarfLineAddr::Encode(MCContext &Context, int64_t LineDelta,
|
|||||||
if (LineDelta == INT64_MAX) {
|
if (LineDelta == INT64_MAX) {
|
||||||
if (AddrDelta == MAX_SPECIAL_ADDR_DELTA)
|
if (AddrDelta == MAX_SPECIAL_ADDR_DELTA)
|
||||||
OS << char(dwarf::DW_LNS_const_add_pc);
|
OS << char(dwarf::DW_LNS_const_add_pc);
|
||||||
else {
|
else if (AddrDelta) {
|
||||||
OS << char(dwarf::DW_LNS_advance_pc);
|
OS << char(dwarf::DW_LNS_advance_pc);
|
||||||
encodeULEB128(AddrDelta, OS);
|
encodeULEB128(AddrDelta, OS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user