Update for LLVM API change

llvm-svn: 222303
This commit is contained in:
David Blaikie 2014-11-19 02:56:13 +00:00
parent 0356975cb2
commit 61b86d4338
5 changed files with 6 additions and 6 deletions

View File

@ -125,7 +125,7 @@ class ModuleDependencyCollector {
public:
StringRef getDest() { return DestDir; }
bool insertSeen(StringRef Filename) { return Seen.insert(Filename); }
bool insertSeen(StringRef Filename) { return Seen.insert(Filename).second; }
void setHasErrors() { HasErrors = true; }
void addFileMapping(StringRef VPath, StringRef RPath) {
VFSWriter.addFileMapping(VPath, RPath);

View File

@ -296,7 +296,7 @@ class OverlayFSDirIterImpl : public clang::vfs::detail::DirIterImpl {
}
CurrentEntry = *CurrentDirIter;
StringRef Name = llvm::sys::path::filename(CurrentEntry.getName());
if (SeenNames.insert(Name))
if (SeenNames.insert(Name).second)
return EC; // name not seen before
}
llvm_unreachable("returned above");

View File

@ -1304,7 +1304,7 @@ llvm::GlobalVariable *MicrosoftCXXABI::getAddrOfVTable(const CXXRecordDecl *RD,
for (size_t J = 0, F = VFPtrs.size(); J != F; ++J) {
SmallString<256> Name;
mangleVFTableName(getMangleContext(), RD, VFPtrs[J], Name);
if (!ObservedMangledNames.insert(Name.str()))
if (!ObservedMangledNames.insert(Name.str()).second)
llvm_unreachable("Already saw this mangling before?");
}
#endif

View File

@ -884,7 +884,7 @@ void Driver::BuildUniversalActions(const ToolChain &TC,
}
A->claim();
if (ArchNames.insert(A->getValue()))
if (ArchNames.insert(A->getValue()).second)
Archs.push_back(A->getValue());
}
}

View File

@ -109,7 +109,7 @@ struct DepCollectorASTListener : public ASTReaderListener {
void DependencyCollector::maybeAddDependency(StringRef Filename, bool FromModule,
bool IsSystem, bool IsModuleFile,
bool IsMissing) {
if (Seen.insert(Filename) &&
if (Seen.insert(Filename).second &&
sawDependency(Filename, FromModule, IsSystem, IsModuleFile, IsMissing))
Dependencies.push_back(Filename);
}
@ -285,7 +285,7 @@ void DFGImpl::InclusionDirective(SourceLocation HashLoc,
}
void DFGImpl::AddFilename(StringRef Filename) {
if (FilesSet.insert(Filename))
if (FilesSet.insert(Filename).second)
Files.push_back(Filename);
}