Skip to content

Commit 73186e3

Browse files
committed
Make OriginalRawIndex a class member
1 parent 2838c93 commit 73186e3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/ObjCopy/COFF/COFFObject.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ namespace coff {
1616
using namespace object;
1717

1818
void Object::addSymbols(ArrayRef<Symbol> NewSymbols) {
19-
size_t RawIndex = 0;
2019
for (Symbol S : NewSymbols) {
2120
S.UniqueId = NextSymbolUniqueId++;
22-
S.OriginalRawIndex = RawIndex;
23-
RawIndex += 1 + S.Sym.NumberOfAuxSymbols;
21+
S.OriginalRawIndex = NextSymbolOriginalIndex;
22+
NextSymbolOriginalIndex += 1 + S.Sym.NumberOfAuxSymbols;
2423
Symbols.emplace_back(S);
2524
}
2625
updateSymbols();

llvm/lib/ObjCopy/COFF/COFFObject.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ struct Object {
141141
DenseMap<size_t, Symbol *> SymbolMap;
142142

143143
size_t NextSymbolUniqueId = 0;
144+
size_t NextSymbolOriginalIndex = 0;
144145

145146
std::vector<Section> Sections;
146147
DenseMap<ssize_t, Section *> SectionMap;

0 commit comments

Comments
 (0)