summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-13 18:21:24 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-13 18:21:24 +0000
commit639f8ea39715fddcac97db525dbe68f85f295221 (patch)
tree48311aa6b021e225ee3c7b4c4281ee062b141a4b /llvm/lib
parent4269b9eed5f68832ecbf1b59e9ab07ce8ac38517 (diff)
downloadbcm5719-llvm-639f8ea39715fddcac97db525dbe68f85f295221.tar.gz
bcm5719-llvm-639f8ea39715fddcac97db525dbe68f85f295221.zip
MCDwarf: Simply MCDwarfFile since it really is just a StringRef and unsigned.
llvm-svn: 203827
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/MCContext.cpp4
-rw-r--r--llvm/lib/MC/MCDwarf.cpp16
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp2
3 files changed, 7 insertions, 15 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 27f66d8393f..5ec5c35630c 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -391,7 +391,9 @@ unsigned MCContext::GetDwarfFile(StringRef Directory, StringRef FileName,
// vector.
char *Buf = static_cast<char *>(Allocate(FileName.size()));
memcpy(Buf, FileName.data(), FileName.size());
- File = new (*this) MCDwarfFile(StringRef(Buf, FileName.size()), DirIndex);
+ File = new (*this) MCDwarfFile;
+ File->Name = StringRef(Buf, FileName.size());
+ File->DirIndex = DirIndex;
// return the allocated FileNumber.
return FileNumber;
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index dc0601d0a61..d1e24fd65f0 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -289,10 +289,10 @@ const MCSymbol *MCDwarfFileTable::EmitCU(MCStreamer *MCOS) const {
// Second the file table.
for (unsigned i = 1; i < MCDwarfFiles.size(); i++) {
- MCOS->EmitBytes(MCDwarfFiles[i]->getName()); // FileName
+ MCOS->EmitBytes(MCDwarfFiles[i]->Name); // FileName
MCOS->EmitBytes(StringRef("\0", 1)); // the null term. of the string
// the Directory num
- MCOS->EmitULEB128IntValue(MCDwarfFiles[i]->getDirIndex());
+ MCOS->EmitULEB128IntValue(MCDwarfFiles[i]->DirIndex);
MCOS->EmitIntValue(0, 1); // last modification timestamp (always 0)
MCOS->EmitIntValue(0, 1); // filesize (always 0)
}
@@ -411,16 +411,6 @@ void MCDwarfLineAddr::Encode(MCContext &Context, int64_t LineDelta,
OS << char(Temp);
}
-void MCDwarfFile::print(raw_ostream &OS) const {
- OS << '"' << getName() << '"';
-}
-
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-void MCDwarfFile::dump() const {
- print(dbgs());
-}
-#endif
-
// Utility function to write a tuple for .debug_abbrev.
static void EmitAbbrev(MCStreamer *MCOS, uint64_t Name, uint64_t Form) {
MCOS->EmitULEB128IntValue(Name);
@@ -614,7 +604,7 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,
}
const SmallVectorImpl<MCDwarfFile *> &MCDwarfFiles =
MCOS->getContext().getMCDwarfFiles();
- MCOS->EmitBytes(MCDwarfFiles[1]->getName());
+ MCOS->EmitBytes(MCDwarfFiles[1]->Name);
MCOS->EmitIntValue(0, 1); // NULL byte to terminate the string.
// AT_comp_dir, the working directory the assembly was done in.
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index db448ae8be2..889fb9dcb34 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -1592,7 +1592,7 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info) {
const SmallVectorImpl<MCDwarfFile *> &MCDwarfFiles =
getContext().getMCDwarfFiles();
if (CppHashFilename.size() != 0) {
- if (MCDwarfFiles[getContext().getGenDwarfFileNumber()]->getName() !=
+ if (MCDwarfFiles[getContext().getGenDwarfFileNumber()]->Name !=
CppHashFilename)
getStreamer().EmitDwarfFileDirective(
getContext().nextGenDwarfFileNumber(), StringRef(),
OpenPOWER on IntegriCloud