From 36fae67831517f132255118b45b21a8cf199a012 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 18 Mar 2011 23:45:43 +0000 Subject: If an AllocaInst referred by DbgDeclareInst is used by a LoadInst then the LoadInst should also get a corresponding llvm.dbg.value intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127924 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/Local.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/llvm/Transforms/Utils/Local.h') diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index 16bcc54503..f63796c4ea 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -24,6 +24,7 @@ class BranchInst; class Instruction; class DbgDeclareInst; class StoreInst; +class LoadInst; class Value; class Pass; class PHINode; @@ -170,6 +171,11 @@ static inline unsigned getKnownAlignment(Value *V, const TargetData *TD = 0) { bool ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI, StoreInst *SI, DIBuilder &Builder); +/// Inserts a llvm.dbg.value instrinsic before the stores to an alloca'd value +/// that has an associated llvm.dbg.decl intrinsic. +bool ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI, + LoadInst *LI, DIBuilder &Builder); + /// LowerDbgDeclare - Lowers llvm.dbg.declare intrinsics into appropriate set /// of llvm.dbg.value intrinsics. bool LowerDbgDeclare(Function &F); -- cgit v1.2.3