[llvm-commits] [llvm] r172453 - /llvm/trunk/include/llvm/ADT/DenseMap.h
Michael Gottesman
mgottesman at apple.com
Mon Jan 14 11:33:36 PST 2013
And a darwin-10 bot as well:
http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-nt-O3/builds/3462/steps/compile/logs/stdio
\Done.
On Jan 14, 2013, at 11:32 AM, Michael Gottesman <mgottesman at apple.com> wrote:
> Looks like this commit broke the llvm-x86_64-ubuntu build.
>
> http://lab.llvm.org:8011/builders/llvm-x86_64-ubuntu/builds/6922/steps/compile/logs/stdio
>
> Michael
>
> On Jan 14, 2013, at 11:24 AM, Joe Groff <arcata at gmail.com> wrote:
>
>> Author: joe
>> Date: Mon Jan 14 13:24:15 2013
>> New Revision: 172453
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=172453&view=rev
>> Log:
>> Add DenseMap::insert(value_type&&) method.
>> Use the existing move implementation of the internal DenseMap::InsertIntoBucket
>> method to provide a user-facing move insert method.
>>
>> Modified:
>> llvm/trunk/include/llvm/ADT/DenseMap.h
>>
>> Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=172453&r1=172452&r2=172453&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
>> +++ llvm/trunk/include/llvm/ADT/DenseMap.h Mon Jan 14 13:24:15 2013
>> @@ -159,6 +159,24 @@
>> return std::make_pair(iterator(TheBucket, getBucketsEnd(), true), true);
>> }
>>
>> +#ifdef LLVM_HAS_RVALUE_REFERENCES
>> + // Inserts key,value pair into the map if the key isn't already in the map.
>> + // If the key is already in the map, it returns false and doesn't update the
>> + // value.
>> + std::pair<iterator, bool> insert(std::pair<KeyT, ValueT> &&KV) {
>> + BucketT *TheBucket;
>> + if (LookupBucketFor(KV.first, TheBucket))
>> + return std::make_pair(iterator(TheBucket, getBucketsEnd(), true),
>> + false); // Already in map.
>> +
>> + // Otherwise, insert the new element.
>> + TheBucket = InsertIntoBucket(std::move(KV.first),
>> + std::move(KV.second),
>> + TheBucket);
>> + return std::make_pair(iterator(TheBucket, getBucketsEnd(), true), true);
>> + }
>> +#endif
>> +
>> /// insert - Range insertion of pairs.
>> template<typename InputIt>
>> void insert(InputIt I, InputIt E) {
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list