mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Consistently get extensions from swift/Frontend/FileTypes.h
...instead of sometimes hardcoding them and sometimes using Strings.h. The exceptions are the libraries that sit below Frontend; these can continue using strings.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "swift/Demangling/Demangle.h"
|
||||
#include "swift/Demangling/ManglingMacros.h"
|
||||
#include "swift/Frontend/DiagnosticVerifier.h"
|
||||
#include "swift/Frontend/FileTypes.h"
|
||||
#include "swift/Frontend/Frontend.h"
|
||||
#include "swift/Frontend/PrintingDiagnosticConsumer.h"
|
||||
#include "swift/SIL/SILBuilder.h"
|
||||
@@ -347,10 +348,12 @@ int main(int argc, char **argv) {
|
||||
OutputFile = OutputFilename;
|
||||
} else if (ModuleName.size()) {
|
||||
OutputFile = ModuleName;
|
||||
llvm::sys::path::replace_extension(OutputFile, SIB_EXTENSION);
|
||||
llvm::sys::path::replace_extension(
|
||||
OutputFile, file_types::getExtension(file_types::TY_SIB));
|
||||
} else {
|
||||
OutputFile = CI.getMainModule()->getName().str();
|
||||
llvm::sys::path::replace_extension(OutputFile, SIB_EXTENSION);
|
||||
llvm::sys::path::replace_extension(
|
||||
OutputFile, file_types::getExtension(file_types::TY_SIB));
|
||||
}
|
||||
|
||||
SerializationOptions serializationOpts;
|
||||
|
||||
Reference in New Issue
Block a user