Added first bit of support for the dwarf .file directive. This patch collects
[oota-llvm.git] / include / llvm / MC / MCContext.h
index a57b5bf745d36b4258eb58a2ef176b94166ad3e0..86f83ad240f8d2c12aee0ad105380e2504709a07 100644 (file)
@@ -15,6 +15,7 @@
 #include "llvm/ADT/StringMap.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/raw_ostream.h"
+#include <vector> // FIXME: Shouldn't be needed.
 
 namespace llvm {
   class MCAsmInfo;
@@ -22,6 +23,7 @@ namespace llvm {
   class MCSection;
   class MCSymbol;
   class MCLabel;
+  class MCDwarfFile;
   class StringRef;
   class Twine;
   class MCSectionMachO;
@@ -66,6 +68,10 @@ namespace llvm {
     /// .secure_log_reset appearing between them.
     bool SecureLogUsed;
 
+    /// The dwarf file and directory tables from the dwarf .file directive.
+    std::vector<MCDwarfFile *> MCDwarfFiles;
+    std::vector<std::string *> MCDwarfDirs;
+
     /// Allocator - Allocator object used for creating machine code objects.
     ///
     /// We use a bump pointer allocator to avoid the need to track all allocated
@@ -137,6 +143,18 @@ namespace llvm {
     }
 
     
+    /// @}
+
+    /// @name Dwarf Managment
+    /// @{
+
+    /// GetDwarfFile - creates an entry in the dwarf file and directory tables.
+    unsigned GetDwarfFile(StringRef FileName, unsigned FileNumber);
+
+    const std::vector<MCDwarfFile *> &getMCDwarfFiles() {
+      return MCDwarfFiles;
+    }
+
     /// @}
 
     char *getSecureLogFile() { return SecureLogFile; }