Skip to content

Commit 6331cb7

Browse files
Merge pull request #522 from kitaisreal/using-located-instead-of-pair
[Swift]: Using Located<T> instead of std::pair<SourceLoc, T>
2 parents 019936b + 41fd8ce commit 6331cb7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/source/Symbol/SwiftASTContext.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "swift/ASTSectionImporter/ASTSectionImporter.h"
3939
#include "swift/Basic/Dwarf.h"
4040
#include "swift/Basic/LangOptions.h"
41+
#include "swift/Basic/Located.h"
4142
#include "swift/Basic/Platform.h"
4243
#include "swift/Basic/PrimarySpecificPaths.h"
4344
#include "swift/Basic/SourceManager.h"
@@ -3725,7 +3726,7 @@ swift::ModuleDecl *SwiftASTContext::GetModule(const SourceModule &module,
37253726
return nullptr;
37263727
}
37273728

3728-
typedef std::pair<swift::Identifier, swift::SourceLoc> ModuleNameSpec;
3729+
typedef swift::Located<swift::Identifier> ModuleNameSpec;
37293730
llvm::StringRef module_basename_sref = module.path.front().GetStringRef();
37303731
ModuleNameSpec name_pair(ast->getIdentifier(module_basename_sref),
37313732
swift::SourceLoc());
@@ -3808,7 +3809,7 @@ swift::ModuleDecl *SwiftASTContext::GetModule(const FileSpec &module_spec,
38083809
ast->SearchPathOpts.ImportSearchPaths.push_back(
38093810
std::move(module_directory));
38103811

3811-
typedef std::pair<swift::Identifier, swift::SourceLoc> ModuleNameSpec;
3812+
typedef swift::Located<swift::Identifier> ModuleNameSpec;
38123813
llvm::StringRef module_basename_sref(module_basename.GetCString());
38133814
ModuleNameSpec name_pair(ast->getIdentifier(module_basename_sref),
38143815
swift::SourceLoc());

0 commit comments

Comments
 (0)