[llvm] r177409 - Fix for r177390: map values are pointers, use DeleteContainerSeconds() instead of .clear()

David Blaikie dblaikie at gmail.com
Tue Mar 19 12:44:10 PDT 2013


On Tue, Mar 19, 2013 at 12:37 PM, Alexey Samsonov <samsonov at google.com> wrote:
> On Tue, Mar 19, 2013 at 8:05 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> On Tue, Mar 19, 2013 at 8:33 AM, Alexey Samsonov <samsonov at google.com>
>> wrote:
>> > Author: samsonov
>> > Date: Tue Mar 19 10:33:18 2013
>> > New Revision: 177409
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=177409&view=rev
>> > Log:
>> > Fix for r177390: map values are pointers, use DeleteContainerSeconds()
>> > instead of .clear()
>>
>> Pony request: could we just move tools like this to build as C++11
>> always & then use an owning smart pointer in the container here
>> instead?
>
>
> Do you mean std::shared_ptr?

If it's single ownership it could just be a std::unique_ptr

>
>>
>> >
>> > Modified:
>> >     llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp
>> >
>> > Modified: llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp
>> > URL:
>> > http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp?rev=177409&r1=177408&r2=177409&view=diff
>> >
>> > ==============================================================================
>> > --- llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp (original)
>> > +++ llvm/trunk/tools/llvm-symbolizer/LLVMSymbolize.cpp Tue Mar 19
>> > 10:33:18 2013
>> > @@ -12,6 +12,7 @@
>> >
>> > //===----------------------------------------------------------------------===//
>> >
>> >  #include "LLVMSymbolize.h"
>> > +#include "llvm/ADT/STLExtras.h"
>> >  #include "llvm/Object/MachO.h"
>> >  #include "llvm/Support/Casting.h"
>> >  #include "llvm/Support/Path.h"
>> > @@ -187,7 +188,7 @@ std::string LLVMSymbolizer::symbolizeDat
>> >  }
>> >
>> >  void LLVMSymbolizer::flush() {
>> > -  Modules.clear();
>> > +  DeleteContainerSeconds(Modules);
>> >  }
>> >
>> >  // Returns true if the object endianness is known.
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
>
> --
> Alexey Samsonov, MSK



More information about the llvm-commits mailing list