File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
include/swift/ClangImporter Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,12 @@ class DWARFImporterDelegate {
110
110
virtual void anchor ();
111
111
};
112
112
113
+ // ⚠️ DANGER ⚠️
114
+ // Putting more than four types in this `PointerUnion` will break the build for
115
+ // 32-bit hosts. If we need five or more types in the future, we'll need to
116
+ // design a proper larger-than-word-sized type.
113
117
typedef llvm::PointerUnion<const clang::Decl *, const clang::MacroInfo *,
114
- const clang::ModuleMacro *, const clang::Type *,
115
- const clang::Token *>
118
+ const clang::Type *, const clang::Token *>
116
119
ImportDiagnosticTarget;
117
120
118
121
// / Class that imports Clang modules into Swift, mapping directly
Original file line number Diff line number Diff line change @@ -4221,9 +4221,6 @@ void ClangImporter::Implementation::diagnoseTargetDirectly(
4221
4221
} else if (const clang::MacroInfo *macro =
4222
4222
target.dyn_cast <const clang::MacroInfo *>()) {
4223
4223
Walker.VisitMacro (macro);
4224
- } else if (const clang::ModuleMacro *macro =
4225
- target.dyn_cast <const clang::ModuleMacro *>()) {
4226
- Walker.VisitMacro (macro->getMacroInfo ());
4227
4224
}
4228
4225
}
4229
4226
@@ -4237,7 +4234,7 @@ ClangImporter::Implementation::importDiagnosticTargetFromLookupTableEntry(
4237
4234
return macro;
4238
4235
} else if (const clang::ModuleMacro *macro =
4239
4236
entry.dyn_cast <clang::ModuleMacro *>()) {
4240
- return macro;
4237
+ return macro-> getMacroInfo () ;
4241
4238
}
4242
4239
llvm_unreachable (" SwiftLookupTable::Single entry must be a NamedDecl, "
4243
4240
" MacroInfo or ModuleMacro pointer" );
You can’t perform that action at this time.
0 commit comments