Use the RHS length instead of the LHS length. They are both the same,
authorChris Lattner <sabre@nondot.org>
Sun, 26 Jul 2009 17:46:03 +0000 (17:46 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 26 Jul 2009 17:46:03 +0000 (17:46 +0000)
commit7e763ebd982e199224a2d2e0cc802d09d2822b34
tree59a5b969ba6243d0f922705b1df04fa9508a9395
parentf9474ca92802228bb792d92dbeb4ef5ba7ecc203
Use the RHS length instead of the LHS length.  They are both the same,
but this ends up compiling code like this:

int foo(const StringRef &R) {
  return R == "food";
}

to use a constant sized memcmp instead of a variable memcmp.

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