[llvm] r186935 - Fix the build in c++03 mode.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jul 23 04:02:17 PDT 2013
Author: rafael
Date: Tue Jul 23 06:02:16 2013
New Revision: 186935
URL: http://llvm.org/viewvc/llvm-project?rev=186935&view=rev
Log:
Fix the build in c++03 mode.
Modified:
llvm/trunk/tools/llvm-ar/llvm-ar.cpp
Modified: llvm/trunk/tools/llvm-ar/llvm-ar.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/llvm-ar.cpp?rev=186935&r1=186934&r2=186935&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/llvm-ar.cpp (original)
+++ llvm/trunk/tools/llvm-ar/llvm-ar.cpp Tue Jul 23 06:02:16 2013
@@ -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;
More information about the llvm-commits
mailing list