llvm.org GIT mirror llvm / 26f4480
Revert r133516 "Remove some unnecessary uses of c_str()." This was causing compile-time failures for some of the Objc and Obj-C++ benchmarks. The specific errors were of the form: "ld: duplicate symbol …" rdar://9660124 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133955 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 8 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
207207 if (objcClassNameFromExpression(c->getOperand(1), superclassName)) {
208208 NameAndAttributes info;
209209 StringMap::value_type &entry =
210 _undefines.GetOrCreateValue(superclassName);
210 _undefines.GetOrCreateValue(superclassName.c_str());
211211 if (!entry.getValue().name) {
212212 const char *symbolName = entry.getKey().data();
213213 info.name = symbolName;
219219 std::string className;
220220 if (objcClassNameFromExpression(c->getOperand(2), className)) {
221221 StringSet::value_type &entry =
222 _defines.GetOrCreateValue(className);
222 _defines.GetOrCreateValue(className.c_str());
223223 entry.setValue(1);
224224 NameAndAttributes info;
225225 info.name = entry.getKey().data();
242242 NameAndAttributes info;
243243
244244 StringMap::value_type &entry =
245 _undefines.GetOrCreateValue(targetclassName);
245 _undefines.GetOrCreateValue(targetclassName.c_str());
246246
247247 if (entry.getValue().name)
248248 return;
263263 NameAndAttributes info;
264264
265265 StringMap::value_type &entry =
266 _undefines.GetOrCreateValue(targetclassName);
266 _undefines.GetOrCreateValue(targetclassName.c_str());
267267 if (entry.getValue().name)
268268 return;
269269
374374
375375 // add to table of symbols
376376 NameAndAttributes info;
377 StringSet::value_type &entry = _defines.GetOrCreateValue(Buffer);
377 StringSet::value_type &entry = _defines.GetOrCreateValue(Buffer.c_str());
378378 entry.setValue(1);
379379
380380 StringRef Name = entry.getKey();
435435 mangler.getNameWithPrefix(name, decl, false);
436436
437437 StringMap::value_type &entry =
438 _undefines.GetOrCreateValue(name);
438 _undefines.GetOrCreateValue(name.c_str());
439439
440440 // we already have the symbol
441441 if (entry.getValue().name)