Add "check/remove dbg var" helper routines.
[oota-llvm.git] / include / llvm / Transforms / Utils / Local.h
index 36c13f4c981b6b53ec7f088b1dd7eb4db4df64ee..c3088a2c7c827bd9b422819ff0a2adea50e7dd75 100644 (file)
@@ -17,6 +17,7 @@
 
 namespace llvm {
 
+class User;
 class BasicBlock;
 class Instruction;
 class Value;
@@ -100,6 +101,14 @@ AllocaInst *DemotePHIToStack(PHINode *P, Instruction *AllocaPoint = 0);
 /// with DbgInfoIntrinsic that use the instruction I.
 bool OnlyUsedByDbgInfoIntrinsics(Instruction *I, 
                            SmallVectorImpl<DbgInfoIntrinsic *> *DbgInUses = 0);
+
+/// UserIsDebugInfo - Return true if U is a constant expr used by 
+/// llvm.dbg.variable or llvm.dbg.global_variable
+bool UserIsDebugInfo(User *U);
+
+/// RemoveDbgInfoUser - Remove an User which is representing debug info.
+void RemoveDbgInfoUser(User *U);
+
 } // End llvm namespace
 
 #endif