mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 08:30:47 +03:00
Add changes for LLVM 3.2.
This commit is contained in:
parent
bf2aaaca84
commit
dbb5a34eda
7 changed files with 34 additions and 1 deletions
|
@ -159,8 +159,16 @@ void VarDeclaration::codegen(Ir* p)
|
|||
LLType *_type = DtoConstInitializerType(type, init);
|
||||
|
||||
// create the global variable
|
||||
#if LDC_LLVM_VER >= 302
|
||||
// FIXME: clang uses a command line option for the thread model
|
||||
LLGlobalVariable* gvar = new LLGlobalVariable(*gIR->module, _type, _isconst,
|
||||
DtoLinkage(this), NULL, _name, 0,
|
||||
isThreadlocal() ? LLGlobalVariable::GeneralDynamicTLSModel
|
||||
: LLGlobalVariable::NotThreadLocal);
|
||||
#else
|
||||
LLGlobalVariable* gvar = new LLGlobalVariable(*gIR->module, _type, _isconst,
|
||||
DtoLinkage(this), NULL, _name, 0, isThreadlocal());
|
||||
#endif
|
||||
this->ir.irGlobal->value = gvar;
|
||||
|
||||
// set the alignment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue