Fix thinko noticed by Chris.
[oota-llvm.git] / lib / VMCore / Metadata.cpp
index 92e4910e422b50b601b09c9337f3002eb97d1556..365fe8b65ff5cb3e818bd8a6017a555410dc917b 100644 (file)
@@ -262,7 +262,7 @@ bool MetadataContext::isValidName(const StringRef MDName) {
   if (MDName.empty())
     return false;
 
-  if (!isalpha(MDName[1]))
+  if (!isalpha(MDName[0]))
     return false;
 
   for (StringRef::iterator I = MDName.begin() + 1, E = MDName.end(); I != E;