[llvm] r241810 - Remove redundant variable. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jul 9 08:24:39 PDT 2015
Author: rafael
Date: Thu Jul 9 10:24:39 2015
New Revision: 241810
URL: http://llvm.org/viewvc/llvm-project?rev=241810&view=rev
Log:
Remove redundant variable. NFC.
Modified:
llvm/trunk/lib/Object/ArchiveWriter.cpp
Modified: llvm/trunk/lib/Object/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ArchiveWriter.cpp?rev=241810&r1=241809&r2=241810&view=diff
==============================================================================
--- llvm/trunk/lib/Object/ArchiveWriter.cpp (original)
+++ llvm/trunk/lib/Object/ArchiveWriter.cpp Thu Jul 9 10:24:39 2015
@@ -190,7 +190,6 @@ writeSymbolTable(raw_fd_ostream &Out, ob
unsigned StartOffset = 0;
SmallString<128> NameBuf;
raw_svector_ostream NameOS(NameBuf);
- unsigned NumSyms = 0;
LLVMContext Context;
for (unsigned MemberNum = 0, N = Members.size(); MemberNum < N; ++MemberNum) {
MemoryBufferRef MemberBuffer = Buffers[MemberNum];
@@ -218,7 +217,6 @@ writeSymbolTable(raw_fd_ostream &Out, ob
if (auto EC = S.printName(NameOS))
return EC;
NameOS << '\0';
- ++NumSyms;
MemberOffsetRefs.push_back(MemberNum);
print32(Out, Kind, 0);
}
@@ -235,6 +233,7 @@ writeSymbolTable(raw_fd_ostream &Out, ob
Out.seek(StartOffset - 12);
printWithSpacePadding(Out, Pos - StartOffset, 10);
Out.seek(StartOffset);
+ unsigned NumSyms = MemberOffsetRefs.size();
print32(Out, Kind, NumSyms);
Out.seek(Pos);
return StartOffset + 4;
More information about the llvm-commits
mailing list