mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The old code misused clang::CompilerInstance::createOutputFile (which should really be sunk down to LLVM). That API specifically handles the case where you can write to the final output file, but not to anything else in that directory. I'm fixing this (and cleaning up the code) because of a copy/paste error Dmitri noticed, where the temp file for the .swiftdoc output would be created as if it were for the .swiftmodule file. This is also now fixed, and the copy/paste code has been refactored. This change should only really affect the case described above, so it's not urgent. Swift SVN r30206
11 lines
383 B
Swift
11 lines
383 B
Swift
// RUN: rm -rf %t && mkdir %t
|
|
// RUN: touch %t/main.swiftmodule %t/main.swiftdoc
|
|
// RUN: chmod -w %t
|
|
|
|
// RUN: %target-swift-frontend -emit-module -emit-module-doc -parse-stdlib -o %t -module-name main %s || chmod +w %t
|
|
|
|
// This is not combined with the previous chmod because of pipefail mode.
|
|
// RUN: chmod +w %t
|
|
// RUN: test -s %t/main.swiftmodule
|
|
// RUN: test -s %t/main.swiftdoc
|