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 {
110110 virtual void anchor ();
111111};
112112
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.
113117typedef 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 *>
116119 ImportDiagnosticTarget;
117120
118121// / 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(
42214221 } else if (const clang::MacroInfo *macro =
42224222 target.dyn_cast <const clang::MacroInfo *>()) {
42234223 Walker.VisitMacro (macro);
4224- } else if (const clang::ModuleMacro *macro =
4225- target.dyn_cast <const clang::ModuleMacro *>()) {
4226- Walker.VisitMacro (macro->getMacroInfo ());
42274224 }
42284225}
42294226
@@ -4237,7 +4234,7 @@ ClangImporter::Implementation::importDiagnosticTargetFromLookupTableEntry(
42374234 return macro;
42384235 } else if (const clang::ModuleMacro *macro =
42394236 entry.dyn_cast <clang::ModuleMacro *>()) {
4240- return macro;
4237+ return macro-> getMacroInfo () ;
42414238 }
42424239 llvm_unreachable (" SwiftLookupTable::Single entry must be a NamedDecl, "
42434240 " MacroInfo or ModuleMacro pointer" );
You can’t perform that action at this time.
0 commit comments