mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 09:33:27 +01:00
Fix compilation of ldc1
This commit is contained in:
10
dmd/module.c
10
dmd/module.c
@@ -45,6 +45,9 @@
|
||||
#endif
|
||||
|
||||
#if IN_LLVM
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include <map>
|
||||
|
||||
@@ -146,10 +149,14 @@ Module::Module(char *filename, Identifier *ident, int doDocComment, int doHdrGen
|
||||
}
|
||||
srcfile = new File(srcfilename);
|
||||
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
llvmForceLogging = false;
|
||||
moduleInfoVar = NULL;
|
||||
moduleInfoType = new llvm::PATypeHolder(llvm::OpaqueType::get(llvm::getGlobalContext()));
|
||||
this->doDocComment = doDocComment;
|
||||
this->doHdrGen = doHdrGen;
|
||||
#endif
|
||||
}
|
||||
|
||||
File* Module::buildFilePath(const char* forcename, const char* path, const char* ext)
|
||||
@@ -282,6 +289,9 @@ void Module::deleteObjFile()
|
||||
|
||||
Module::~Module()
|
||||
{
|
||||
#if IN_LLVM
|
||||
delete moduleInfoType;
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *Module::kind()
|
||||
|
||||
Reference in New Issue
Block a user