Convert StringMap to using StringRef for its APIs.
 - Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 837024f..3656ef0 100644
--- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -1657,7 +1657,7 @@
       // Ignore unknown calls.
       const char *CalleeName = Callee->getNameStart();
       StringMap<LibCallOptimization*>::iterator OMI =
-        Optimizations.find(CalleeName, CalleeName+Callee->getNameLen());
+        Optimizations.find(StringRef(CalleeName, Callee->getNameLen()));
       if (OMI == Optimizations.end()) continue;
       
       // Set the builder to the instruction after the call.