#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;
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; }
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.
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
//
// This emits the Dwarf file and the line tables.
//
- static void Emit(MCStreamer *MCOS);
+ static const MCSymbol *Emit(MCStreamer *MCOS);
};
class MCDwarfLineAddr {
// 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;
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; }
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;
unsigned PersonalityEncoding;
unsigned LsdaEncoding;
uint32_t CompactUnwindEncoding;
+ bool IsSignalFrame;
};
class MCDwarfFrameEmitter {