Skip to content

[sourcekitd] Remove calls to llvm::Initialize* #11658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/TargetSelect.h"
#include <chrono>
#include <xpc/xpc.h>
#include <dispatch/dispatch.h>
Expand Down Expand Up @@ -251,11 +250,6 @@ static void handleInterruptedConnection(xpc_object_t event, xpc_connection_t con
void sourcekitd::initialize() {
initializeTracing();

llvm::InitializeAllTargets();
llvm::InitializeAllTargetMCs();
llvm::InitializeAllAsmPrinters();
llvm::InitializeAllAsmParsers();

assert(!GlobalConn);
GlobalConn = xpc_connection_create(SOURCEKIT_XPCSERVICE_IDENTIFIER, nullptr);

Expand Down
6 changes: 0 additions & 6 deletions tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/TargetSelect.h"
#include <mutex>

// FIXME: Portability.
Expand Down Expand Up @@ -87,11 +86,6 @@ static void onDocumentUpdateNotification(StringRef DocumentName) {
static SourceKit::Context *GlobalCtx = nullptr;

void sourcekitd::initialize() {
llvm::InitializeAllTargets();
llvm::InitializeAllTargetMCs();
llvm::InitializeAllAsmPrinters();
llvm::InitializeAllAsmParsers();

GlobalCtx = new SourceKit::Context(sourcekitd::getRuntimeLibPath(),
SourceKit::createSwiftLangSupport);
GlobalCtx->getNotificationCenter().addDocumentUpdateNotificationReceiver(
Expand Down