Make the copy member of StringRef/ArrayRef generic wrt allocators.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 18 Apr 2014 16:36:15 +0000 (16:36 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 18 Apr 2014 16:36:15 +0000 (16:36 +0000)
commit98b539ae65afeda465ea14da246da4c03edbb9ca
tree21f6540cb88dbac583100f2c5657da34b22efad2
parent7b4b26161160d93a0b1bd16962c66b5b626fa696
Make the copy member of StringRef/ArrayRef generic wrt allocators.

Doesn't make sense to restrict this to BumpPtrAllocator. While there
replace an explicit loop with std::equal. Some standard libraries know
how to compile this down to a ::memcmp call if possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206615 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/ArrayRef.h
include/llvm/ADT/StringRef.h
include/llvm/CodeGen/MachineValueType.h