Cleanup: Kill backend_init/term.

This commit is contained in:
David Nadlinger
2013-10-05 22:47:30 +02:00
parent 177b892bf0
commit 71c67457c3
2 changed files with 6 additions and 22 deletions

View File

@@ -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();

View File

@@ -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();
}