summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-13 21:59:51 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-13 21:59:51 +0000
commit43d5e074aa8c24506aedf6b7d95839fdd28030b7 (patch)
treec4ea4486c9a8a6a4887160e7c32dbf48b4292b24 /lib
parent91d5586086b9459d8b615da2a37f3dddbb9eff50 (diff)
downloadllvm-43d5e074aa8c24506aedf6b7d95839fdd28030b7.tar.gz
llvm-43d5e074aa8c24506aedf6b7d95839fdd28030b7.tar.bz2
llvm-43d5e074aa8c24506aedf6b7d95839fdd28030b7.tar.xz
MCDwarf: Rename MCDwarfFileTable to MCDwarfLineTable
This type now represents all the data for the DWARF line table: directory names, file names, and the line table proper. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCContext.cpp4
-rw-r--r--lib/MC/MCDwarf.cpp13
-rw-r--r--lib/MC/MCObjectStreamer.cpp2
3 files changed, 10 insertions, 9 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp
index 6ffe25982d..f5f3bddcb2 100644
--- a/lib/MC/MCContext.cpp
+++ b/lib/MC/MCContext.cpp
@@ -84,7 +84,7 @@ void MCContext::reset() {
Symbols.clear();
Allocator.Reset();
Instances.clear();
- MCDwarfFileTablesCUMap.clear();
+ MCDwarfLineTablesCUMap.clear();
MCGenDwarfLabelEntries.clear();
DwarfDebugFlags = StringRef();
DwarfCompileUnitID = 0;
@@ -337,7 +337,7 @@ const MCSectionCOFF *MCContext::getCOFFSection(StringRef Section) {
/// allocated file number is returned. The file numbers may be in any order.
unsigned MCContext::GetDwarfFile(StringRef Directory, StringRef FileName,
unsigned FileNumber, unsigned CUID) {
- MCDwarfFileTable &Table = MCDwarfFileTablesCUMap[CUID];
+ MCDwarfLineTable &Table = MCDwarfLineTablesCUMap[CUID];
return Table.getFile(Directory, FileName, FileNumber);
}
diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp
index 81ba40e964..181e73dd43 100644
--- a/lib/MC/MCDwarf.cpp
+++ b/lib/MC/MCDwarf.cpp
@@ -82,7 +82,7 @@ void MCLineEntry::Make(MCStreamer *MCOS, const MCSection *Section) {
// Add the line entry to this section's entries.
MCOS->getContext()
- .getMCDwarfFileTable(MCOS->getContext().getDwarfCompileUnitID())
+ .getMCDwarfLineTable(MCOS->getContext().getDwarfCompileUnitID())
.getMCLineSections()
.addLineEntry(LineEntry, Section);
}
@@ -204,14 +204,14 @@ EmitDwarfLineTable(MCStreamer *MCOS, const MCSection *Section,
//
// This emits the Dwarf file and the line tables.
//
-const MCSymbol *MCDwarfFileTable::Emit(MCStreamer *MCOS) {
+const MCSymbol *MCDwarfLineTable::Emit(MCStreamer *MCOS) {
MCContext &context = MCOS->getContext();
// CUID and MCLineTableSymbols are set in DwarfDebug, when DwarfDebug does
// not exist, CUID will be 0 and MCLineTableSymbols will be empty.
// Handle Compile Unit 0, the line table start symbol is the section symbol.
- auto I = MCOS->getContext().getMCDwarfFileTables().begin(),
- E = MCOS->getContext().getMCDwarfFileTables().end();
+ auto I = MCOS->getContext().getMCDwarfLineTables().begin(),
+ E = MCOS->getContext().getMCDwarfLineTables().end();
// Switch to the section where the table will be emitted into.
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfLineSection());
@@ -303,7 +303,7 @@ std::pair<MCSymbol *, MCSymbol *> MCDwarfLineTableHeader::Emit(MCStreamer *MCOS)
return std::make_pair(LineStartSym, LineEndSym);
}
-const MCSymbol *MCDwarfFileTable::EmitCU(MCStreamer *MCOS) const {
+const MCSymbol *MCDwarfLineTable::EmitCU(MCStreamer *MCOS) const {
MCSymbol *LineStartSym;
MCSymbol *LineEndSym;
std::tie(LineStartSym, LineEndSym) = Header.Emit(MCOS);
@@ -331,7 +331,8 @@ const MCSymbol *MCDwarfFileTable::EmitCU(MCStreamer *MCOS) const {
return LineStartSym;
}
-unsigned MCDwarfFileTable::getFile(StringRef Directory, StringRef FileName, unsigned FileNumber) {
+unsigned MCDwarfLineTable::getFile(StringRef Directory, StringRef FileName,
+ unsigned FileNumber) {
return Header.getFile(Directory, FileName, FileNumber);
}
diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp
index 996cf5c09b..6b2234eeb3 100644
--- a/lib/MC/MCObjectStreamer.cpp
+++ b/lib/MC/MCObjectStreamer.cpp
@@ -380,7 +380,7 @@ void MCObjectStreamer::FinishImpl() {
// Dump out the dwarf file & directory tables and line tables.
const MCSymbol *LineSectionSymbol = NULL;
if (getContext().hasMCLineSections())
- LineSectionSymbol = MCDwarfFileTable::Emit(this);
+ LineSectionSymbol = MCDwarfLineTable::Emit(this);
// If we are generating dwarf for assembly source files dump out the sections.
if (getContext().getGenDwarfForAssembly())