StringMap::first() is about to start returning a StringRef, adapt.

llvm-svn: 135166
This commit is contained in:
Chris Lattner 2011-07-14 18:24:21 +00:00
parent 4f8dd9de31
commit d386df4dbd
2 changed files with 4 additions and 3 deletions

View File

@ -3055,7 +3055,8 @@ TargetInfo *TargetInfo::CreateTargetInfo(Diagnostic &Diags,
Opts.Features.clear();
for (llvm::StringMap<bool>::const_iterator it = Features.begin(),
ie = Features.end(); it != ie; ++it)
Opts.Features.push_back(std::string(it->second ? "+" : "-") + it->first());
Opts.Features.push_back(std::string(it->second ? "+" : "-") +
llvm::StringRef(it->first()).str());
Target->HandleTargetFeatures(Opts.Features);
return Target.take();

View File

@ -1174,8 +1174,8 @@ void ASTWriter::WriteStatCache(MemorizeStatCalls &StatCalls) {
for (MemorizeStatCalls::iterator Stat = StatCalls.begin(),
StatEnd = StatCalls.end();
Stat != StatEnd; ++Stat, ++NumStatEntries) {
const char *Filename = Stat->first();
Generator.insert(Filename, Stat->second);
llvm::StringRef Filename = Stat->first();
Generator.insert(Filename.data(), Stat->second);
}
// Create the on-disk hash table in a buffer.