Skip to content

Commit d67918b

Browse files
committed
[Stdlib] Add some prespecializations to the stdlib
This adds prespecializations for commonly used types to the stdlib
1 parent 861fd2f commit d67918b

File tree

3 files changed

+954
-0
lines changed

3 files changed

+954
-0
lines changed

lib/DriverTool/sil_opt_main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,8 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
614614
options.EnableObjCInterop ? true :
615615
options.DisableObjCInterop ? false : llvm::Triple(options.Target).isOSDarwin();
616616

617+
Invocation.getLangOptions().Features.insert(Feature::LayoutPrespecialization);
618+
617619
Invocation.getLangOptions().OptimizationRemarkPassedPattern =
618620
createOptRemarkRegex(options.PassRemarksPassed);
619621
Invocation.getLangOptions().OptimizationRemarkMissedPattern =

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
838838
if (Args.hasArg(OPT_enable_builtin_module))
839839
Opts.Features.insert(Feature::BuiltinModule);
840840

841+
Opts.Features.insert(Feature::LayoutPrespecialization);
842+
841843
Opts.EnableAppExtensionRestrictions |= Args.hasArg(OPT_enable_app_extension);
842844

843845
Opts.EnableSwift3ObjCInference =

0 commit comments

Comments
 (0)