[PATCH] D37768: [IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 12 15:26:57 PDT 2017
probinson added inline comments.
================
Comment at: llvm/lib/IR/IntrinsicInst.cpp:27
#include "llvm/IR/Constants.h"
+#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/GlobalVariable.h"
----------------
With no other changes in the file, I'm guessing you don't actually need this?
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:4141
// Remove any existing dbg.declare intrinsic describing the same alloca.
- if (DbgDeclareInst *OldDDI = FindAllocaDbgDeclare(Fragment.Alloca))
- OldDDI->eraseFromParent();
+ for (DbgInfoIntrinsic *OldDII : FindDbgAddrUses(Fragment.Alloca))
+ OldDII->eraseFromParent();
----------------
Preceding comment is no longer fully correct.
https://reviews.llvm.org/D37768
More information about the llvm-commits
mailing list