Skip to content

Commit 91a1773

Browse files
elshbeccadax
andcommitted
Update lib/AST/ASTDumper.cpp
Co-authored-by: Becca Royal-Gordon <[email protected]>
1 parent 4afc761 commit 91a1773

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,8 @@ namespace {
524524
// Check if module aliasing was used for the given imported module; for
525525
// example, if '-module-alias Foo=Bar' was passed and this module has
526526
// 'import Foo', its corresponding real module name 'Bar' should be printed.
527-
ImportPath::Builder builderWithRealModuleName;
528-
auto path = ID->getImportPath(/*outRealModuleName=*/&builderWithRealModuleName);
529-
if (!builderWithRealModuleName.get().empty()) {
530-
// Module aliasing was used, so print its real module name
531-
builderWithRealModuleName.get().print(OS);
532-
} else {
533-
path.print(OS);
534-
}
527+
ImportPath::Builder scratch;
528+
ID->getRealImportPath(scratch).print(OS);
535529
OS << "')";
536530
}
537531

0 commit comments

Comments
 (0)