[BOLT][DWARF] Fix performance regression running BOLT on binaries build with DWARF4

In one of the previous diffs LocBuffer was changed to pass by value. This lead to
performance regression running BOLT on binaries with DWARF4 split dwarf.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D155763
This commit is contained in:
Alexander Yermolovich 2023-07-20 11:47:36 -07:00
parent 4b3eaee270
commit d5235e5346

View File

@ -651,7 +651,7 @@ static void writeLegacyLocList(DIEValue &AttrInfo,
DebugLocationsVector &LocList,
DIEBuilder &DIEBldr, DIE &Die,
DebugAddrWriter &AddrWriter,
DebugBufferVector LocBuffer, DWARFUnit &CU,
DebugBufferVector &LocBuffer, DWARFUnit &CU,
raw_svector_ostream &LocStream) {
if (LocList.empty()) {
replaceLocValbyForm(DIEBldr, Die, AttrInfo, AttrInfo.getForm(),