aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lto
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
commit6316fbcb04af00fe76b6526fab09f51484014b3e (patch)
tree8b18f95c06e96a5e23713880efa491c02372f40c /tools/lto
parentb53cc014d0f47b898c9daca34566c16dda6c4c1e (diff)
downloadexternal_llvm-6316fbcb04af00fe76b6526fab09f51484014b3e.zip
external_llvm-6316fbcb04af00fe76b6526fab09f51484014b3e.tar.gz
external_llvm-6316fbcb04af00fe76b6526fab09f51484014b3e.tar.bz2
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 'tools/lto')
-rw-r--r--tools/lto/LTOModule.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index 3637b9d..a72938a 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -379,7 +379,7 @@ void LTOModule::addDefinedSymbol(GlobalValue* def, Mangler &mangler,
void LTOModule::addAsmGlobalSymbol(const char *name) {
// only add new define if not already defined
- if ( _defines.count(name, &name[strlen(name)+1]) == 0 )
+ if ( _defines.count(name) == 0 )
return;
// string is owned by _defines
@@ -507,8 +507,7 @@ void LTOModule::lazyParseSymbols()
it != _undefines.end(); ++it) {
// if this symbol also has a definition, then don't make an undefine
// because it is a tentative definition
- if ( _defines.count(it->getKeyData(), it->getKeyData()+
- it->getKeyLength()) == 0 ) {
+ if ( _defines.count(it->getKey())) {
NameAndAttributes info = it->getValue();
_symbols.push_back(info);
}