forked from OSchip/llvm-project
parent
0356975cb2
commit
61b86d4338
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue