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.
llvm-svn: 76888
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 837024f..3656ef0 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/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.