diff options
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index c25a3ef..4c050bf 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -1159,8 +1159,8 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { if (Result.is(tok::colon) && ModuleDeclState.isNamedModule()) { std::string Name = ModuleDeclState.getPrimaryName().str(); Name += ":"; - NamedModuleImportPath.push_back( - {getIdentifierInfo(Name), Result.getLocation()}); + NamedModuleImportPath.emplace_back(Result.getLocation(), + getIdentifierInfo(Name)); CurLexerCallback = CLK_LexAfterModuleImport; return true; } @@ -1258,8 +1258,8 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { if (ModuleImportExpectsIdentifier && Result.getKind() == tok::identifier) { // We expected to see an identifier here, and we did; continue handling // identifiers. - NamedModuleImportPath.push_back( - std::make_pair(Result.getIdentifierInfo(), Result.getLocation())); + NamedModuleImportPath.emplace_back(Result.getLocation(), + Result.getIdentifierInfo()); ModuleImportExpectsIdentifier = false; CurLexerCallback = CLK_LexAfterModuleImport; return true; @@ -1302,12 +1302,12 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { // If the FlatModuleName ends with colon, it implies it is a partition. if (!FlatModuleName.empty() && FlatModuleName.back() != ':') FlatModuleName += "."; - FlatModuleName += Piece.first->getName(); + FlatModuleName += Piece.getIdentifierInfo()->getName(); } - SourceLocation FirstPathLoc = NamedModuleImportPath[0].second; + SourceLocation FirstPathLoc = NamedModuleImportPath[0].getLoc(); NamedModuleImportPath.clear(); - NamedModuleImportPath.push_back( - std::make_pair(getIdentifierInfo(FlatModuleName), FirstPathLoc)); + NamedModuleImportPath.emplace_back(FirstPathLoc, + getIdentifierInfo(FlatModuleName)); } Module *Imported = nullptr; |