File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -440,10 +440,7 @@ class DebugStrOffsetsWriter {
440
440
void updateAddressMap (uint32_t Index, uint32_t Address);
441
441
442
442
// / Get offset for given index in original .debug_str_offsets section.
443
- uint64_t getOffset (uint32_t Index) const {
444
- assert (StrOffsets.size () >= Index && " Index is out of bounds." );
445
- return StrOffsets[Index];
446
- }
443
+ uint64_t getOffset (uint32_t Index) const { return StrOffsets[Index]; }
447
444
// / Writes out current sections entry into .debug_str_offsets.
448
445
void finalizeSection (DWARFUnit &Unit, DIEBuilder &DIEBldr);
449
446
@@ -468,7 +465,7 @@ class DebugStrOffsetsWriter {
468
465
std::unique_ptr<DebugStrOffsetsBufferVector> StrOffsetsBuffer;
469
466
std::unique_ptr<raw_svector_ostream> StrOffsetsStream;
470
467
std::map<uint32_t , uint32_t > IndexToAddressMap;
471
- std::vector <uint32_t > StrOffsets;
468
+ SmallVector <uint32_t , 5 > StrOffsets;
472
469
std::unordered_map<uint64_t , uint64_t > ProcessedBaseOffsets;
473
470
bool StrOffsetSectionWasModified = false ;
474
471
};
You can’t perform that action at this time.
0 commit comments