void-packages/srcpkgs/ghdl/patches/396eb764f49666616063d4239df...

50 lines
2.2 KiB
Diff
Raw Normal View History

2021-05-16 23:47:21 +02:00
From 396eb764f49666616063d4239df83b5aed961fff Mon Sep 17 00:00:00 2001
From: Jeroen Van den Keybus <jeroen.vandenkeybus@gmail.com>
Date: Mon, 26 Apr 2021 20:17:40 +0200
Subject: [PATCH] Migrate deprecated DebugLoc::get to DILocation::get
---
src/ortho/llvm6/llvm-cbindings.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/ortho/llvm6/llvm-cbindings.cpp b/src/ortho/llvm6/llvm-cbindings.cpp
index f82845ffcd..98470d8fab 100644
--- a/src/ortho/llvm6/llvm-cbindings.cpp
+++ b/src/ortho/llvm6/llvm-cbindings.cpp
@@ -1254,7 +1254,7 @@ new_var_decl(ODnode *Res, OIdent Ident, OStorage Storage, OTnode Atype)
DebugCurrentLine, Atype->Dbg, true);
DBuilder->insertDeclare
(unwrap(Decl), D, DBuilder->createExpression(),
- DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope),
+ DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope),
unwrap(LLVMGetInsertBlock(DeclBuilder)));
}
#endif
@@ -1597,7 +1597,7 @@ start_subprogram_body(ODnodeSubprg *Func)
DebugCurrentScope = DebugCurrentSubprg;
unwrap(Builder)->SetCurrentDebugLocation
- (DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope));
+ (DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope));
}
if (FlagDebug) {
@@ -1612,7 +1612,7 @@ start_subprogram_body(ODnodeSubprg *Func)
DebugCurrentFile, DebugCurrentLine, Inter->Dtype->Dbg, true);
DBuilder->insertDeclare
(unwrap(Var), D, DBuilder->createExpression(),
- DebugLoc::get(DebugCurrentLine, 0, DebugCurrentSubprg),
+ DILocation::get(DebugCurrentSubprg->getContext(), DebugCurrentLine, 0, DebugCurrentSubprg),
unwrap(LLVMGetInsertBlock(DeclBuilder)));
LLVMBuildStore(DeclBuilder, Inter->Ref, Var);
Inter->Ref = Var;
@@ -2759,7 +2759,7 @@ new_debug_line_stmt (unsigned Line)
if (FlagDebugLines && Line != DebugCurrentLine) {
DebugCurrentLine = Line;
unwrap(Builder)->SetCurrentDebugLocation
- (DebugLoc::get(DebugCurrentLine, 0, DebugCurrentScope));
+ (DILocation::get(DebugCurrentScope->getContext(), DebugCurrentLine, 0, DebugCurrentScope));
}
#endif
}