misched: Generate IsBuffered flag for machine resources.
[oota-llvm.git] / include / llvm / MC / MCDwarf.h
index bca50b21dc27bf7c02357e215e8797fc73a0d956..8fc437f3e691112483791d150a792812afc7edfb 100644 (file)
 
 #include "llvm/ADT/StringRef.h"
 #include "llvm/MC/MachineLocation.h"
-#include "llvm/MC/MCObjectWriter.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Dwarf.h"
+#include "llvm/Support/Compiler.h"
 #include <vector>
 
 namespace llvm {
   class MCContext;
-  class MCExpr;
+  class MCObjectWriter;
   class MCSection;
-  class MCSectionData;
   class MCStreamer;
   class MCSymbol;
-  class MCObjectStreamer;
-  class raw_ostream;
   class SourceMgr;
   class SMLoc;
 
@@ -52,8 +49,8 @@ namespace llvm {
     MCDwarfFile(StringRef name, unsigned dirIndex)
       : Name(name), DirIndex(dirIndex) {}
 
-    MCDwarfFile(const MCDwarfFile&);       // DO NOT IMPLEMENT
-    void operator=(const MCDwarfFile&); // DO NOT IMPLEMENT
+    MCDwarfFile(const MCDwarfFile&) LLVM_DELETED_FUNCTION;
+    void operator=(const MCDwarfFile&) LLVM_DELETED_FUNCTION;
   public:
     /// getName - Get the base name of this MCDwarfFile.
     StringRef getName() const { return Name; }
@@ -62,7 +59,7 @@ namespace llvm {
     unsigned getDirIndex() const { return DirIndex; }
 
 
-    /// print - Print the value to the stream \arg OS.
+    /// print - Print the value to the stream \p OS.
     void print(raw_ostream &OS) const;
 
     /// dump - Print the value to stderr.
@@ -181,8 +178,8 @@ namespace llvm {
   class MCLineSection {
 
   private:
-    MCLineSection(const MCLineSection&);  // DO NOT IMPLEMENT
-    void operator=(const MCLineSection&); // DO NOT IMPLEMENT
+    MCLineSection(const MCLineSection&) LLVM_DELETED_FUNCTION;
+    void operator=(const MCLineSection&) LLVM_DELETED_FUNCTION;
 
   public:
     // Constructor to create an MCLineSection with an empty MCLineEntries
@@ -212,7 +209,7 @@ namespace llvm {
     //
     // This emits the Dwarf file and the line tables.
     //
-    static void Emit(MCStreamer *MCOS);
+    static const MCSymbol *Emit(MCStreamer *MCOS);
   };
 
   class MCDwarfLineAddr {
@@ -235,12 +232,12 @@ namespace llvm {
     // When generating dwarf for assembly source files this emits the Dwarf
     // sections.
     //
-    static void Emit(MCStreamer *MCOS);
+    static void Emit(MCStreamer *MCOS, const MCSymbol *LineSectionSymbol);
   };
 
   // When generating dwarf for assembly source files this is the info that is
-  // needed to be gathered for each symbol that will have a dwarf2_subprogram.
-  class MCGenDwarfSubprogramEntry {
+  // needed to be gathered for each symbol that will have a dwarf label.
+  class MCGenDwarfLabelEntry {
   private:
     // Name of the symbol without a leading underbar, if any.
     StringRef Name;
@@ -248,14 +245,12 @@ namespace llvm {
     unsigned FileNumber;
     // The line number this symbol is at.
     unsigned LineNumber;
-    // The low_pc for the dwarf2_subprogram is taken from this symbol.  The
-    // high_pc is taken from the next symbol's value or the end of the section
-    // for the last symbol
+    // The low_pc for the dwarf label is taken from this symbol.
     MCSymbol *Label;
 
   public:
-    MCGenDwarfSubprogramEntry(StringRef name, unsigned fileNumber,
-                              unsigned lineNumber, MCSymbol *label) :
+    MCGenDwarfLabelEntry(StringRef name, unsigned fileNumber,
+                         unsigned lineNumber, MCSymbol *label) :
       Name(name), FileNumber(fileNumber), LineNumber(lineNumber), Label(label){}
 
     StringRef getName() const { return Name; }
@@ -314,7 +309,8 @@ namespace llvm {
   struct MCDwarfFrameInfo {
     MCDwarfFrameInfo() : Begin(0), End(0), Personality(0), Lsda(0),
                          Function(0), Instructions(), PersonalityEncoding(),
-                         LsdaEncoding(0), CompactUnwindEncoding(0) {}
+                         LsdaEncoding(0), CompactUnwindEncoding(0),
+                         IsSignalFrame(false) {}
     MCSymbol *Begin;
     MCSymbol *End;
     const MCSymbol *Personality;
@@ -324,6 +320,7 @@ namespace llvm {
     unsigned PersonalityEncoding;
     unsigned LsdaEncoding;
     uint32_t CompactUnwindEncoding;
+    bool IsSignalFrame;
   };
 
   class MCDwarfFrameEmitter {