mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Fix compilation of ldc1
This commit is contained in:
@@ -203,7 +203,7 @@ struct Param
|
||||
char *hdrdir; // write 'header' file to docdir directory
|
||||
char *hdrname; // write 'header' file to docname
|
||||
|
||||
char doXGeneration; // write JSON file
|
||||
bool doXGeneration; // write JSON file
|
||||
char *xfilename; // write JSON file to xfilename
|
||||
|
||||
unsigned debuglevel; // debug level
|
||||
|
||||
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()
|
||||
|
||||
@@ -34,6 +34,8 @@ typedef DValue elem;
|
||||
namespace llvm {
|
||||
class LLVMContext;
|
||||
class Module;
|
||||
class GlobalVariable;
|
||||
class PATypeHolder;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -194,8 +196,11 @@ struct Module : Package
|
||||
void buildTargetFiles(bool singleObj);
|
||||
File* buildFilePath(const char* forcename, const char* path, const char* ext);
|
||||
Module *isModule() { return this; }
|
||||
llvm::GlobalVariable* moduleInfoSymbol();
|
||||
|
||||
bool llvmForceLogging;
|
||||
llvm::GlobalVariable* moduleInfoVar;
|
||||
llvm::PATypeHolder* moduleInfoType;
|
||||
|
||||
// array ops emitted in this module already
|
||||
StringTable arrayfuncs;
|
||||
|
||||
@@ -541,9 +541,10 @@ struct CaseStatement : Statement
|
||||
|
||||
CaseStatement* isCaseStatement() { return this; }
|
||||
|
||||
// LDC
|
||||
#if IN_LLVM
|
||||
llvm::BasicBlock* bodyBB;
|
||||
llvm::ConstantInt* llvmIdx;
|
||||
llvm::Value* llvmIdx;
|
||||
#endif
|
||||
};
|
||||
|
||||
#if DMDV2
|
||||
|
||||
Reference in New Issue
Block a user