From af4e37dba2d861cc99193bd6a113797ef78091ea Mon Sep 17 00:00:00 2001 From: PietroGhg Date: Mon, 29 Jan 2024 13:59:41 +0000 Subject: [PATCH] Update findDbgDeclare for LLVM 18 --- modules/compiler/utils/source/barrier_regions.cpp | 3 +-- modules/compiler/vecz/source/transform/basic_mem2reg_pass.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/compiler/utils/source/barrier_regions.cpp b/modules/compiler/utils/source/barrier_regions.cpp index 795d9f4c3..bc82e69eb 100644 --- a/modules/compiler/utils/source/barrier_regions.cpp +++ b/modules/compiler/utils/source/barrier_regions.cpp @@ -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 DbgIntrinsics; - findDbgDeclares(DbgIntrinsics, member.value); + auto DbgIntrinsics = findDbgDeclares(member.value); #elif LLVM_VERSION_GREATER_EQUAL(17, 0) auto DbgIntrinsics = FindDbgDeclareUses(member.value); #else diff --git a/modules/compiler/vecz/source/transform/basic_mem2reg_pass.cpp b/modules/compiler/vecz/source/transform/basic_mem2reg_pass.cpp index b5559151f..cd2bb4f3c 100644 --- a/modules/compiler/vecz/source/transform/basic_mem2reg_pass.cpp +++ b/modules/compiler/vecz/source/transform/basic_mem2reg_pass.cpp @@ -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 DbgIntrinsics; - findDbgDeclares(DbgIntrinsics, Alloca); + auto DbgIntrinsics = findDbgDeclares(Alloca); #elif LLVM_VERSION_GREATER_EQUAL(17, 0) auto DbgIntrinsics = FindDbgDeclareUses(Alloca); #else