mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
Merge branch 'master' into merge-2.067
This commit is contained in:
commit
a5cc02235d
2 changed files with 15 additions and 1 deletions
|
@ -61,7 +61,11 @@ llvm::LLVMContext &ldc::DIBuilder::getContext()
|
||||||
return IR->context();
|
return IR->context();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LDC_LLVM_VER >= 307
|
||||||
|
llvm::MDScope* ldc::DIBuilder::GetCurrentScope()
|
||||||
|
#else
|
||||||
llvm::DIDescriptor ldc::DIBuilder::GetCurrentScope()
|
llvm::DIDescriptor ldc::DIBuilder::GetCurrentScope()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
IrFunction *fn = IR->func();
|
IrFunction *fn = IR->func();
|
||||||
if (fn->diLexicalBlocks.empty())
|
if (fn->diLexicalBlocks.empty())
|
||||||
|
@ -81,6 +85,9 @@ void ldc::DIBuilder::Declare(llvm::Value *var, llvm::DIVariable divar
|
||||||
llvm::Instruction *instr = DBuilder.insertDeclare(var, divar,
|
llvm::Instruction *instr = DBuilder.insertDeclare(var, divar,
|
||||||
#if LDC_LLVM_VER >= 306
|
#if LDC_LLVM_VER >= 306
|
||||||
diexpr,
|
diexpr,
|
||||||
|
#endif
|
||||||
|
#if LDC_LLVM_VER >= 307
|
||||||
|
IR->ir->getCurrentDebugLocation(),
|
||||||
#endif
|
#endif
|
||||||
IR->scopebb());
|
IR->scopebb());
|
||||||
instr->setDebugLoc(IR->ir->getCurrentDebugLocation());
|
instr->setDebugLoc(IR->ir->getCurrentDebugLocation());
|
||||||
|
@ -437,7 +444,7 @@ llvm::DIType ldc::DIBuilder::CreateCompositeType(Type *type)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LDC_LLVM_VER >= 307
|
#if LDC_LLVM_VER >= 307
|
||||||
ir->diCompositeType = DBuilder.replaceTemporary(llvm::TempMDType(ir->diCompositeType), static_cast<llvm::MDCompositeType*>(ret.get()));
|
ir->diCompositeType = DBuilder.replaceTemporary(llvm::TempMDType(ir->diCompositeType), static_cast<llvm::MDType*>(ret));
|
||||||
#else
|
#else
|
||||||
ir->diCompositeType.replaceAllUsesWith(ret);
|
ir->diCompositeType.replaceAllUsesWith(ret);
|
||||||
#endif
|
#endif
|
||||||
|
@ -815,6 +822,9 @@ void ldc::DIBuilder::EmitValue(llvm::Value *val, VarDeclaration *vd)
|
||||||
llvm::Instruction *instr = DBuilder.insertDbgValueIntrinsic(val, 0, debugVariable,
|
llvm::Instruction *instr = DBuilder.insertDbgValueIntrinsic(val, 0, debugVariable,
|
||||||
#if LDC_LLVM_VER >= 306
|
#if LDC_LLVM_VER >= 306
|
||||||
DBuilder.createExpression(),
|
DBuilder.createExpression(),
|
||||||
|
#endif
|
||||||
|
#if LDC_LLVM_VER >= 307
|
||||||
|
IR->ir->getCurrentDebugLocation(),
|
||||||
#endif
|
#endif
|
||||||
IR->scopebb());
|
IR->scopebb());
|
||||||
instr->setDebugLoc(IR->ir->getCurrentDebugLocation());
|
instr->setDebugLoc(IR->ir->getCurrentDebugLocation());
|
||||||
|
|
|
@ -156,7 +156,11 @@ public:
|
||||||
private:
|
private:
|
||||||
llvm::LLVMContext &getContext();
|
llvm::LLVMContext &getContext();
|
||||||
Module *getDefinedModule(Dsymbol *s);
|
Module *getDefinedModule(Dsymbol *s);
|
||||||
|
#if LDC_LLVM_VER >= 307
|
||||||
|
llvm::MDScope* GetCurrentScope();
|
||||||
|
#else
|
||||||
llvm::DIDescriptor GetCurrentScope();
|
llvm::DIDescriptor GetCurrentScope();
|
||||||
|
#endif
|
||||||
void Declare(llvm::Value *var, llvm::DIVariable divar
|
void Declare(llvm::Value *var, llvm::DIVariable divar
|
||||||
#if LDC_LLVM_VER >= 306
|
#if LDC_LLVM_VER >= 306
|
||||||
, llvm::DIExpression diexpr
|
, llvm::DIExpression diexpr
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue