aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCContext.h
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2011-12-09 18:09:40 +0000
committerKevin Enderby <enderby@apple.com>2011-12-09 18:09:40 +0000
commit94c2e85bea1ab1b837a4c055ccc83d5cd32dd027 (patch)
tree2439394068bac231063b5bd6d977167d65e29ebf /include/llvm/MC/MCContext.h
parentbf67a99c35412db4bf6c1e2fd511d9044d6acc71 (diff)
downloadexternal_llvm-94c2e85bea1ab1b837a4c055ccc83d5cd32dd027.tar.gz
external_llvm-94c2e85bea1ab1b837a4c055ccc83d5cd32dd027.tar.bz2
external_llvm-94c2e85bea1ab1b837a4c055ccc83d5cd32dd027.zip
The second part of support for generating dwarf for assembly source files. This
generates the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. The next part will be to get the clang driver to enable this when assembling a .s file. rdar://9275556 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCContext.h')
-rw-r--r--include/llvm/MC/MCContext.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h
index d45b0c8ca6..455b45ea23 100644
--- a/include/llvm/MC/MCContext.h
+++ b/include/llvm/MC/MCContext.h
@@ -108,6 +108,16 @@ namespace llvm {
/// The default initial text section that we generate dwarf debugging line
/// info for when generating dwarf assembly source files.
const MCSection *GenDwarfSection;
+ /// Symbols created for the start and end of this section.
+ MCSymbol *GenDwarfSectionStartSym, *GenDwarfSectionEndSym;
+
+ /// The information gathered from labels that will have dwarf subprogram
+ /// entries when generating dwarf assembly source files.
+ std::vector<const MCGenDwarfSubprogramEntry *> MCGenDwarfSubprogramEntries;
+
+ /// The string to embed in the debug information for the compile unit, if
+ /// non-empty.
+ StringRef DwarfDebugFlags;
/// Honor temporary labels, this is useful for debugging semantic
/// differences between temporary and non-temporary labels (primarily on
@@ -269,6 +279,24 @@ namespace llvm {
unsigned nextGenDwarfFileNumber() { return ++GenDwarfFileNumber; }
const MCSection *getGenDwarfSection() { return GenDwarfSection; }
void setGenDwarfSection(const MCSection *Sec) { GenDwarfSection = Sec; }
+ MCSymbol *getGenDwarfSectionStartSym() { return GenDwarfSectionStartSym; }
+ void setGenDwarfSectionStartSym(MCSymbol *Sym) {
+ GenDwarfSectionStartSym = Sym;
+ }
+ MCSymbol *getGenDwarfSectionEndSym() { return GenDwarfSectionEndSym; }
+ void setGenDwarfSectionEndSym(MCSymbol *Sym) {
+ GenDwarfSectionEndSym = Sym;
+ }
+ const std::vector<const MCGenDwarfSubprogramEntry *>
+ &getMCGenDwarfSubprogramEntries() const {
+ return MCGenDwarfSubprogramEntries;
+ }
+ void addMCGenDwarfSubprogramEntry(const MCGenDwarfSubprogramEntry *E) {
+ MCGenDwarfSubprogramEntries.push_back(E);
+ }
+
+ void setDwarfDebugFlags(StringRef S) { DwarfDebugFlags = S; }
+ StringRef getDwarfDebugFlags() { return DwarfDebugFlags; }
/// @}