SR-11889: Using Located<T> instead of std::pair<SourceLoc, T>

This commit is contained in:
Kita, Maksim
2019-12-08 22:51:48 +03:00
parent 06014e6226
commit b7cb3b67bf
38 changed files with 209 additions and 171 deletions

View File

@@ -325,14 +325,14 @@ int main(int argc, char **argv) {
llvm::outs() << "Importing " << path << "... ";
#ifdef SWIFT_SUPPORTS_SUBMODULES
std::vector<std::pair<swift::Identifier, swift::SourceLoc> > AccessPath;
std::vector<swift::Located<swift::Identifier>> AccessPath;
for (auto i = llvm::sys::path::begin(path);
i != llvm::sys::path::end(path); ++i)
if (!llvm::sys::path::is_separator((*i)[0]))
AccessPath.push_back({ CI.getASTContext().getIdentifier(*i),
swift::SourceLoc() });
#else
std::vector<std::pair<swift::Identifier, swift::SourceLoc> > AccessPath;
std::vector<swift::Located<swift::Identifier>> AccessPath;
AccessPath.push_back({ CI.getASTContext().getIdentifier(path),
swift::SourceLoc() });
#endif