mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 17:43:14 +01:00
Cleanup: Kill backend_init/term.
This commit is contained in:
@@ -29,8 +29,10 @@
|
||||
#include "gen/metadata.h"
|
||||
#include "gen/optimizer.h"
|
||||
#include "gen/passes/Passes.h"
|
||||
#include "gen/runtime.h"
|
||||
#include "llvm/Linker.h"
|
||||
#include "llvm/Support/Host.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "llvm/Support/TargetSelect.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
@@ -57,8 +59,6 @@
|
||||
using namespace opts;
|
||||
|
||||
extern void getenv_setargv(const char *envvar, int *pargc, char** *pargv);
|
||||
extern void backend_init();
|
||||
extern void backend_term();
|
||||
|
||||
static cl::opt<bool> noDefaultLib("nodefaultlib",
|
||||
cl::desc("Don't add a default library for linking implicitly"),
|
||||
@@ -668,10 +668,6 @@ int main(int argc, char** argv)
|
||||
Expression::init();
|
||||
initPrecedence();
|
||||
|
||||
backend_init();
|
||||
|
||||
//printf("%d source files\n",files.dim);
|
||||
|
||||
// Build import search path
|
||||
if (global.params.imppath)
|
||||
{
|
||||
@@ -1108,7 +1104,10 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
backend_term();
|
||||
|
||||
LLVM_D_FreeRuntime();
|
||||
llvm::llvm_shutdown();
|
||||
|
||||
if (global.errors)
|
||||
fatal();
|
||||
|
||||
|
||||
15
gen/toir.cpp
15
gen/toir.cpp
@@ -3544,18 +3544,3 @@ llvm::Constant* Expression::toConstElem(IRState * p)
|
||||
fatal();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void backend_init()
|
||||
{
|
||||
// LLVM_D_InitRuntime is done in Module::genLLVMModule
|
||||
// since it requires the semantic pass to be done
|
||||
}
|
||||
|
||||
void backend_term()
|
||||
{
|
||||
LLVM_D_FreeRuntime();
|
||||
llvm::llvm_shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user