mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Don't spend time initializing LLVM when running the driver (#14896)
Tiny start-up time optimization noticed while looking at how we do PrettyStackTraceProgram. Also add PrettyStackTraceProgram to a few more of our testing tools, via the new PROGRAM_START macro.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "swift/AST/DiagnosticEngine.h"
|
||||
#include "swift/AST/DiagnosticsFrontend.h"
|
||||
#include "swift/Basic/LangOptions.h"
|
||||
#include "swift/Basic/LLVMInitialize.h"
|
||||
#include "swift/Basic/SourceManager.h"
|
||||
#include "swift/Frontend/Frontend.h"
|
||||
#include "swift/Frontend/PrintingDiagnosticConsumer.h"
|
||||
@@ -281,6 +282,7 @@ int dumpEOFSourceLoc(const char *MainExecutablePath,
|
||||
}// end of anonymous namespace
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
PROGRAM_START(argc, argv);
|
||||
llvm::cl::ParseCommandLineOptions(argc, argv, "Swift Syntax Test\n");
|
||||
|
||||
int ExitCode = EXIT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user