summaryrefslogtreecommitdiff
path: root/include/llvm/Transforms/Utils/Local.h
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-17 21:58:19 +0000
committerDevang Patel <dpatel@apple.com>2011-03-17 21:58:19 +0000
commit5ee20680c7ebc765950983633e19fafab5235245 (patch)
treed1e4ede052af1d73de5d91fbbccffe73099975eb /include/llvm/Transforms/Utils/Local.h
parent1c10b8de46ce8e39178eeded4786b1e53722f099 (diff)
downloadllvm-5ee20680c7ebc765950983633e19fafab5235245.tar.gz
llvm-5ee20680c7ebc765950983633e19fafab5235245.tar.bz2
llvm-5ee20680c7ebc765950983633e19fafab5235245.tar.xz
Refactor into a separate utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/Local.h')
-rw-r--r--include/llvm/Transforms/Utils/Local.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h
index 2823fbb719..8f97428649 100644
--- a/include/llvm/Transforms/Utils/Local.h
+++ b/include/llvm/Transforms/Utils/Local.h
@@ -21,12 +21,15 @@ class User;
class BasicBlock;
class BranchInst;
class Instruction;
+class DbgDeclareInst;
+class StoreInst;
class Value;
class Pass;
class PHINode;
class AllocaInst;
class ConstantExpr;
class TargetData;
+class DIBuilder;
template<typename T> class SmallVectorImpl;
@@ -157,6 +160,15 @@ static inline unsigned getKnownAlignment(Value *V, const TargetData *TD = 0) {
return getOrEnforceKnownAlignment(V, 0, TD);
}
+///===---------------------------------------------------------------------===//
+/// Dbg Intrinsic utilities
+///
+
+/// 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,
+ StoreInst *SI, DIBuilder &Builder);
+
} // End llvm namespace
#endif