Skip to content

Commit 72ad29a

Browse files
authored
Merge pull request swiftlang#12935 from adrian-prantl/cherry
master-next: Update IRGenDebugInfo.cpp for LLVM r313825
2 parents 9727a9e + ddf8148 commit 72ad29a

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"
@@ -1976,7 +1977,7 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic(
19761977
auto *BB = Builder.GetInsertBlock();
19771978

19781979
// An alloca may only be described by exactly one dbg.declare.
1979-
if (isa<llvm::AllocaInst>(Storage) && llvm::FindAllocaDbgDeclare(Storage))
1980+
if (isa<llvm::AllocaInst>(Storage) && !llvm::FindDbgAddrUses(Storage).empty())
19801981
return;
19811982

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

0 commit comments

Comments
 (0)