[polly] r216842 - Use range based for loops
Tobias Grosser
tobias at grosser.es
Wed Sep 10 07:52:13 PDT 2014
On 03/09/2014 00:11, Duncan P. N. Exon Smith wrote:
>
>> On 2014 Aug 31, at 12:10, Tobias Grosser <tobias at grosser.es> wrote:
>>
>> @@ -562,9 +561,8 @@ SetVector<Value *> ClastStmtCodeGen::get
>> SetVector<Value *> Values;
>>
>> // The clast variables
>> - for (CharMapT::iterator I = ClastVars.begin(), E = ClastVars.end(); I != E;
>> - I++)
>> - Values.insert(I->second);
>> + for (auto I : ClastVars)
>> + Values.insert(I.second);
>>
>> // Find the temporaries that are referenced in the clast statements'
>> // basic blocks but are not defined by these blocks (e.g., references
>
> Is there any reason not to use `const auto &` here (and in the cases
> following)? It's not obvious without looking up the container whether
> copying this `pair` is cheap.
Thanks for checking (and sorry for the delay). I fixed this in r217507.
Cheers,
Tobias
More information about the llvm-commits
mailing list