Record variable debug info at ISel time directly.
[oota-llvm.git] / include / llvm / CodeGen / DwarfWriter.h
index a5597322fcbbe8ae49983c4011905dede8e0006a..5c7ce0521be029ed1bebb9ba4191c7f78bdf4704 100644 (file)
@@ -21,6 +21,7 @@
 #define LLVM_CODEGEN_DWARFWRITER_H
 
 #include "llvm/Pass.h"
+#include "llvm/Target/TargetMachine.h"
 
 namespace llvm {
 
@@ -29,11 +30,16 @@ class DwarfDebug;
 class DwarfException;
 class MachineModuleInfo;
 class MachineFunction;
+class MachineInstr;
 class Value;
 class Module;
 class GlobalVariable;
 class TargetAsmInfo;
 class raw_ostream;
+class Instruction;
+class DICompileUnit;
+class DISubprogram;
+class DIVariable;
 
 //===----------------------------------------------------------------------===//
 // DwarfWriter - Emits Dwarf debug and exception handling directives.
@@ -54,7 +60,7 @@ public:
 
   DwarfWriter();
   virtual ~DwarfWriter();
-  
+
   //===--------------------------------------------------------------------===//
   // Main entry points.
   //
@@ -76,20 +82,10 @@ public:
   ///
   void EndFunction(MachineFunction *MF);
 
-  /// ValidDebugInfo - Return true if V represents valid debug info value.
-  bool ValidDebugInfo(Value *V);
-
   /// RecordSourceLine - Register a source line with debug info. Returns a
   /// unique label ID used to generate a label and provide correspondence to
   /// the source line list.
-  unsigned RecordSourceLine(unsigned Line, unsigned Col, unsigned Src);
-
-  /// getOrCreateSourceID - Look up the source id with the given directory and
-  /// source file names. If none currently exists, create a new id and insert it
-  /// in the SourceIds map. This can update DirectoryIds and SourceFileIds maps
-  /// as well.
-  unsigned getOrCreateSourceID(const std::string &DirName,
-                               const std::string &FileName);
+  unsigned RecordSourceLine(unsigned Line, unsigned Col, DICompileUnit CU);
 
   /// RecordRegionStart - Indicate the start of a region.
   unsigned RecordRegionStart(GlobalVariable *V);
@@ -107,6 +103,13 @@ public:
   /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
   /// be emitted.
   bool ShouldEmitDwarfDebug() const;
+
+  //// RecordInlinedFnStart - Indicate the start of a inlined function.
+  unsigned RecordInlinedFnStart(DISubprogram SP, DICompileUnit CU,
+                                unsigned Line, unsigned Col);
+
+  /// RecordInlinedFnEnd - Indicate the end of inlined subroutine.
+  unsigned RecordInlinedFnEnd(DISubprogram SP);
 };