Skip to content

Commit 046400d

Browse files
committed
Consistently initialize clang CodeGenOptions.DebugTypeExtRefs
on all code paths. This flag is part of the Clang module hash. Setting it on all paths makes it easier to reason about the permutations of Clang modules that are being built on behalf of Swift. (cherry picked from commit f0b7065)
1 parent 6275f24 commit 046400d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ static clang::CodeGenerator *createClangCodeGenerator(ASTContext &Context,
103103
auto &CGO = Importer->getClangCodeGenOpts();
104104
CGO.OptimizationLevel = Opts.shouldOptimize() ? 3 : 0;
105105

106+
CGO.DebugTypeExtRefs = !Opts.DisableClangModuleSkeletonCUs;
106107
CGO.DiscardValueNames = !Opts.shouldProvideValueNames();
107108
switch (Opts.DebugInfoLevel) {
108109
case IRGenDebugInfoLevel::None:
@@ -113,7 +114,6 @@ static clang::CodeGenerator *createClangCodeGenerator(ASTContext &Context,
113114
break;
114115
case IRGenDebugInfoLevel::ASTTypes:
115116
case IRGenDebugInfoLevel::DwarfTypes:
116-
CGO.DebugTypeExtRefs = !Opts.DisableClangModuleSkeletonCUs;
117117
CGO.setDebugInfo(clang::codegenoptions::DebugInfoKind::FullDebugInfo);
118118
break;
119119
}

0 commit comments

Comments
 (0)