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)
commite3c374ac334383b77de010b382bebc1e3acfcc4c
tree6533ea2b26165f1738dbba683fa47bd03f57b67e
parentbd2cd92907dcab4a6fb78b08842f5867071ad3c2
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.

llvm-svn: 77160
llvm/include/llvm/ADT/StringRef.h