aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-23 18:17:34 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-23 18:17:34 +0000
commit4d10add69d4b366dacaa7bb0ceb7db4ac61b4d3d (patch)
tree8b18f95c06e96a5e23713880efa491c02372f40c /lib/Transforms/Scalar/SimplifyLibCalls.cpp
parentdf272512181f7db8fb865c58272c47a9e2bd52c6 (diff)
downloadexternal_llvm-4d10add69d4b366dacaa7bb0ceb7db4ac61b4d3d.tar.gz
external_llvm-4d10add69d4b366dacaa7bb0ceb7db4ac61b4d3d.tar.bz2
external_llvm-4d10add69d4b366dacaa7bb0ceb7db4ac61b4d3d.zip
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
Diffstat (limited to 'lib/Transforms/Scalar/SimplifyLibCalls.cpp')
-rw-r--r--lib/Transforms/Scalar/SimplifyLibCalls.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 837024f626..3656ef013f 100644
--- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -1657,7 +1657,7 @@ bool SimplifyLibCalls::runOnFunction(Function &F) {
// 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.