Skip to content

Commit 1c17a90

Browse files
authored
Merge pull request #12951 from adrian-prantl/cherry
2 parents 6b48102 + bf30b39 commit 1c17a90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "llvm/Config/config.h"
4646
#include "llvm/IR/DIBuilder.h"
4747
#include "llvm/IR/DebugInfo.h"
48+
#include "llvm/IR/IntrinsicInst.h"
4849
#include "llvm/IR/Module.h"
4950
#include "llvm/Support/CommandLine.h"
5051
#include "llvm/Support/Debug.h"
@@ -2003,7 +2004,7 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic(
20032004
auto *BB = Builder.GetInsertBlock();
20042005

20052006
// An alloca may only be described by exactly one dbg.declare.
2006-
if (isa<llvm::AllocaInst>(Storage) && llvm::FindAllocaDbgDeclare(Storage))
2007+
if (isa<llvm::AllocaInst>(Storage) && !llvm::FindDbgAddrUses(Storage).empty())
20072008
return;
20082009

20092010
// A dbg.declare is only meaningful if there is a single alloca for

0 commit comments

Comments
 (0)