Fix compilation of ldc1

This commit is contained in:
Alexey Prokhin
2011-01-04 20:59:39 +03:00
parent ceeff57700
commit d1ff4e9fd3
4 changed files with 19 additions and 3 deletions

View File

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