mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Clear any LLVMArgs when initializing the CompilerInvocation for SourceKit's ASTManager
SourceKit doesn't use them and if any unrecognised LLVM options are passed to llvm::cl::ParseCommandLineOptions() it calls exit(), bringing down SourceKit. Also use fprintf instead of llvm::errs() in Logging.cpp as it uses a global C++ object that had already been destructed when logging the above failure. Resolves rdar://problem/38314383
This commit is contained in:
@@ -63,7 +63,7 @@ Logger::~Logger() {
|
||||
OS << llvm::format("%7.4f] ", TR.getWallTime() - sBeginTR.getWallTime());
|
||||
OS << Msg.str();
|
||||
|
||||
llvm::errs() << LoggerName << ": " << LogMsg.str() << '\n';
|
||||
fprintf(stderr, "%s: %s", LoggerName.c_str(), LogMsg.c_str());
|
||||
|
||||
#if __APPLE__
|
||||
// Use the Apple System Log facility.
|
||||
|
||||
Reference in New Issue
Block a user