fix a bug in my previous patch, a classic =/== bug.
authorChris Lattner <sabre@nondot.org>
Wed, 30 Apr 2008 15:27:09 +0000 (15:27 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 30 Apr 2008 15:27:09 +0000 (15:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50483 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Value.cpp

index cf696fe44feee92df2854f61cdb4c826d1a390db..e55e558e0f99bc70e71ff084e50eeb2af7b1b905 100644 (file)
@@ -140,7 +140,7 @@ unsigned Value::getNameLen() const {
 /// nul terminated string.
 bool Value::isName(const char *N) const {
   unsigned InLen = strlen(N);
-  return InLen = getNameLen() && memcmp(getNameStart(), N, InLen) == 0;
+  return InLen == getNameLen() && memcmp(getNameStart(), N, InLen) == 0;
 }