createGlobalVariable() requires a context with LLVM 3.6

This commit is contained in:
Kai Nacke 2014-09-29 23:19:40 +02:00
parent 4c9beb7b47
commit f5a42f2620

View file

@ -791,6 +791,9 @@ llvm::DIGlobalVariable ldc::DIBuilder::EmitGlobalVariable(llvm::GlobalVariable *
assert(vd->isDataseg() || (vd->storage_class & (STCconst | STCimmutable) && vd->init));
return DBuilder.createGlobalVariable(
#if LDC_LLVM_VER >= 306
GetCurrentScope(), // context
#endif
vd->toChars(), // name
#if LDC_LLVM_VER >= 303
mangle(vd), // linkage name