[llvm-commits] [llvm] r68728 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Bill Wendling
isanbard at gmail.com
Thu Apr 9 16:52:09 PDT 2009
On Thu, Apr 9, 2009 at 4:35 PM, Chris Lattner <clattner at apple.com> wrote:
> On Apr 9, 2009, at 2:49 PM, Bill Wendling wrote:
>> + StringMap<DIE*> &Globals = Unit->getGlobals();
>> + for (StringMap<DIE*>::iterator
>> + GI = Globals.begin(), GE = Globals.end(); GI != GE; +
>> +GI) {
>> + const std::string &Name = GI->first();
>> DIE * Entity = GI->second;
>
> Note that GI->first() returns a const char*, not an std::string. This
> means that you're creating a temporary string object every time you
> iterate over this. Please update this (and other places that poke the
> map) to use better APIs.
>
Ah! Okay. I modified it now. Thanks for catching this!
-bw
More information about the llvm-commits
mailing list