Skip to content

Commit 936c993

Browse files
committed
Sema: Change a couple of Identifier usages to DeclName instead
1 parent 67edfea commit 936c993

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7878,7 +7878,7 @@ ERROR(expected_macro_expansion_expr,PointsToFirstBadToken,
78787878
ERROR(expected_macro_expansion_decls,PointsToFirstBadToken,
78797879
"expected macro expansion to produce a declaration", ())
78807880
ERROR(macro_undefined,PointsToFirstBadToken,
7881-
"no macro named %0", (Identifier))
7881+
"no macro named %0", (DeclName))
78827882
ERROR(external_macro_not_found,none,
78837883
"external macro implementation type '%0.%1' could not be found for "
78847884
"macro %2; %3", (StringRef, StringRef, DeclName, StringRef))

lib/AST/ASTContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ struct ASTContext::Implementation {
520520
llvm::DenseMap<const AbstractFunctionDecl *, SourceRange> OriginalBodySourceRanges;
521521

522522
/// Macro discriminators per context.
523-
llvm::DenseMap<std::pair<const void *, Identifier>, unsigned>
523+
llvm::DenseMap<std::pair<const void *, DeclBaseName>, unsigned>
524524
NextMacroDiscriminator;
525525

526526
/// Local and closure discriminators per context.
@@ -2286,8 +2286,8 @@ unsigned ASTContext::getNextMacroDiscriminator(
22862286
MacroDiscriminatorContext context,
22872287
DeclBaseName baseName
22882288
) {
2289-
std::pair<const void *, Identifier> key(
2290-
context.getOpaqueValue(), baseName.getIdentifier());
2289+
std::pair<const void *, DeclBaseName> key(
2290+
context.getOpaqueValue(), baseName);
22912291
return getImpl().NextMacroDiscriminator[key]++;
22922292
}
22932293

lib/Sema/CSGen.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4068,8 +4068,8 @@ namespace {
40684068
}
40694069

40704070
/// Lookup all macros with the given macro name.
4071-
SmallVector<OverloadChoice, 1> lookupMacros(Identifier moduleName,
4072-
Identifier macroName,
4071+
SmallVector<OverloadChoice, 1> lookupMacros(DeclName moduleName,
4072+
DeclName macroName,
40734073
FunctionRefInfo functionRefInfo,
40744074
MacroRoles roles) {
40754075
SmallVector<OverloadChoice, 1> choices;
@@ -4100,8 +4100,8 @@ namespace {
41004100
CS.associateArgumentList(locator, expr->getArgs());
41014101

41024102
// Look up the macros with this name.
4103-
auto moduleIdent = expr->getModuleName().getBaseIdentifier();
4104-
auto macroIdent = expr->getMacroName().getBaseIdentifier();
4103+
auto moduleIdent = expr->getModuleName().getBaseName();
4104+
auto macroIdent = expr->getMacroName().getBaseName();
41054105
FunctionRefInfo functionRefInfo = FunctionRefInfo::singleBaseNameApply();
41064106
auto macros = lookupMacros(moduleIdent, macroIdent, functionRefInfo,
41074107
expr->getMacroRoles());

0 commit comments

Comments
 (0)