mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Introduce non-recursive print options and use them to handle IUO
printing more elegantly. NFC intended.
This commit is contained in:
@@ -1063,10 +1063,11 @@ static StringRef getPrintedName(SDKContext &Ctx, Type Ty,
|
||||
llvm::raw_string_ostream OS(S);
|
||||
PrintOptions PO = getTypePrintOpts(Ctx.getOpts());
|
||||
PO.SkipAttributes = true;
|
||||
NonRecursivePrintOptions OPO;
|
||||
if (IsImplicitlyUnwrappedOptional)
|
||||
PO.PrintOptionalAsImplicitlyUnwrapped = true;
|
||||
OPO |= NonRecursivePrintOption::ImplicitlyUnwrappedOptional;
|
||||
|
||||
Ty.print(OS, PO);
|
||||
Ty.print(OS, PO, OPO);
|
||||
return Ctx.buffer(OS.str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user