Skip to content

Commit 733c2a3

Browse files
Merge pull request #36353 from apple/QuietMisdreavus/proper-path-handling
[Frontend] don't pop the last path component from -emit-symbol-graph-dir
2 parents e12f4ef + 3e22b20 commit 733c2a3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/Frontend/Frontend.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ SerializationOptions CompilerInvocation::computeSerializationOptions(
164164
}
165165
SmallString<256> OutputDir(serializationOpts.SymbolGraphOutputDir);
166166
llvm::sys::fs::make_absolute(OutputDir);
167-
llvm::sys::path::remove_filename(OutputDir);
168167
serializationOpts.SymbolGraphOutputDir = OutputDir.str().str();
169168
}
170169

test/SymbolGraph/EmitWhileBuilding.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
// RUN: %target-build-swift %s -module-name EmitWhileBuilding -emit-module -emit-module-path %t/ -emit-symbol-graph -emit-symbol-graph-dir %t/
33
// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json
44

5+
// also try without the trailing slash on `-emit-symbol-graph-dir` and make sure it works
6+
7+
// RUN: %empty-directory(%t)
8+
// RUN: %target-build-swift %s -module-name EmitWhileBuilding -emit-module -emit-module-path %t/ -emit-symbol-graph -emit-symbol-graph-dir %t
9+
// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json
10+
511
/// Does a foo.
612
public func foo() {}
713

0 commit comments

Comments
 (0)