diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-06-21 15:36:24 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-06-21 15:36:24 +0000 |
commit | 06155e88d09c273edf509f511f717c38a7e2d263 (patch) | |
tree | b8b62ae40088f9b4a106d1405b68472ac446e2d3 /tools | |
parent | 9ee714789e7fa2eff314bca10ded0323e48d1def (diff) | |
download | external_llvm-06155e88d09c273edf509f511f717c38a7e2d263.zip external_llvm-06155e88d09c273edf509f511f717c38a7e2d263.tar.gz external_llvm-06155e88d09c273edf509f511f717c38a7e2d263.tar.bz2 |
Remove some unnecessary uses of c_str().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lto/LTOModule.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 8f2b1f4..c899555 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -208,7 +208,7 @@ void LTOModule::addObjCClass(GlobalVariable *clgv) { if (objcClassNameFromExpression(c->getOperand(1), superclassName)) { NameAndAttributes info; StringMap<NameAndAttributes>::value_type &entry = - _undefines.GetOrCreateValue(superclassName.c_str()); + _undefines.GetOrCreateValue(superclassName); if (!entry.getValue().name) { const char *symbolName = entry.getKey().data(); info.name = symbolName; @@ -220,7 +220,7 @@ void LTOModule::addObjCClass(GlobalVariable *clgv) { std::string className; if (objcClassNameFromExpression(c->getOperand(2), className)) { StringSet::value_type &entry = - _defines.GetOrCreateValue(className.c_str()); + _defines.GetOrCreateValue(className); entry.setValue(1); NameAndAttributes info; info.name = entry.getKey().data(); @@ -243,7 +243,7 @@ void LTOModule::addObjCCategory(GlobalVariable *clgv) { NameAndAttributes info; StringMap<NameAndAttributes>::value_type &entry = - _undefines.GetOrCreateValue(targetclassName.c_str()); + _undefines.GetOrCreateValue(targetclassName); if (entry.getValue().name) return; @@ -264,7 +264,7 @@ void LTOModule::addObjCClassRef(GlobalVariable *clgv) { NameAndAttributes info; StringMap<NameAndAttributes>::value_type &entry = - _undefines.GetOrCreateValue(targetclassName.c_str()); + _undefines.GetOrCreateValue(targetclassName); if (entry.getValue().name) return; @@ -375,7 +375,7 @@ void LTOModule::addDefinedSymbol(GlobalValue *def, Mangler &mangler, // add to table of symbols NameAndAttributes info; - StringSet::value_type &entry = _defines.GetOrCreateValue(Buffer.c_str()); + StringSet::value_type &entry = _defines.GetOrCreateValue(Buffer); entry.setValue(1); StringRef Name = entry.getKey(); @@ -436,7 +436,7 @@ void LTOModule::addPotentialUndefinedSymbol(GlobalValue *decl, mangler.getNameWithPrefix(name, decl, false); StringMap<NameAndAttributes>::value_type &entry = - _undefines.GetOrCreateValue(name.c_str()); + _undefines.GetOrCreateValue(name); // we already have the symbol if (entry.getValue().name) |