mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
Fix the build in c++03 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186935 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
26b10da9c2
commit
af02bf4a58
@ -643,7 +643,7 @@ static void writeSymbolTable(
|
||||
unsigned StartOffset = 0;
|
||||
unsigned MemberNum = 0;
|
||||
std::vector<StringRef> SymNames;
|
||||
std::vector<OwningPtr<object::ObjectFile> > DeleteIt;
|
||||
std::vector<object::ObjectFile *> DeleteIt;
|
||||
for (ArrayRef<NewArchiveIterator>::iterator I = Members.begin(),
|
||||
E = Members.end();
|
||||
I != E; ++I, ++MemberNum) {
|
||||
@ -665,7 +665,7 @@ static void writeSymbolTable(
|
||||
}
|
||||
if (!Obj)
|
||||
continue;
|
||||
DeleteIt.push_back(OwningPtr<object::ObjectFile>(Obj));
|
||||
DeleteIt.push_back(Obj);
|
||||
if (!StartOffset) {
|
||||
printMemberHeader(Out, "", sys::TimeValue::now(), 0, 0, 0, 0);
|
||||
StartOffset = Out.tell();
|
||||
@ -698,6 +698,13 @@ static void writeSymbolTable(
|
||||
Out << '\0';
|
||||
}
|
||||
|
||||
for (std::vector<object::ObjectFile *>::iterator I = DeleteIt.begin(),
|
||||
E = DeleteIt.end();
|
||||
I != E; ++I) {
|
||||
object::ObjectFile *O = *I;
|
||||
delete O;
|
||||
}
|
||||
|
||||
if (StartOffset == 0)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user