Skip to content

Commit

Permalink
Merge pull request #320 from PietroGhg/pietro/finddbgdeclare
Browse files Browse the repository at this point in the history
Update findDbgDeclares for LLVM 18
  • Loading branch information
PietroGhg authored Jan 30, 2024
2 parents 1dda1f5 + af4e37d commit 49722f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions modules/compiler/utils/source/barrier_regions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,7 @@ void compiler::utils::Barrier::MakeLiveVariableMemType() {
// Check if the alloca has a debug info source variable attached. If
// so record this and the matching byte offset into the struct.
#if LLVM_VERSION_GREATER_EQUAL(18, 0)
SmallVector<DbgDeclareInst *, 1> DbgIntrinsics;
findDbgDeclares(DbgIntrinsics, member.value);
auto DbgIntrinsics = findDbgDeclares(member.value);
#elif LLVM_VERSION_GREATER_EQUAL(17, 0)
auto DbgIntrinsics = FindDbgDeclareUses(member.value);
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ bool BasicMem2RegPass::promoteAlloca(AllocaInst *Alloca) const {
ToDelete.push_back(Store);
DIBuilder DIB(*Alloca->getModule(), /*AllowUnresolved*/ false);
#if LLVM_VERSION_GREATER_EQUAL(18, 0)
SmallVector<DbgDeclareInst *, 1> DbgIntrinsics;
findDbgDeclares(DbgIntrinsics, Alloca);
auto DbgIntrinsics = findDbgDeclares(Alloca);
#elif LLVM_VERSION_GREATER_EQUAL(17, 0)
auto DbgIntrinsics = FindDbgDeclareUses(Alloca);
#else
Expand Down

0 comments on commit 49722f9

Please sign in to comment.