diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-13 18:55:04 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-13 18:55:04 +0000 |
commit | 8c987f534048928a7242e5edeac09b07de353a3d (patch) | |
tree | 8dbf0bde8da3c7d3dcf1fd186ec6f8d6ee80ecb1 /lib/MC/MCDwarf.cpp | |
parent | ed2ca70ccff2e2654a41d6d9fc74683d6ec0a2ff (diff) | |
download | llvm-8c987f534048928a7242e5edeac09b07de353a3d.tar.gz llvm-8c987f534048928a7242e5edeac09b07de353a3d.tar.bz2 llvm-8c987f534048928a7242e5edeac09b07de353a3d.tar.xz |
MCDwarf: Simplify MCDwarfFile to just use std::string instead of cunning use of MCContext's allocator.
There aren't /that/ many files, and we are already using various maps
and other standard containers that don't use MCContext's allocator to
store these values, so this doesn't seem to be critical and simplifies
the design (I'll be moving construction out of MCContext shortly so it'd
be annoying to have to pass the allocator around to allocate these
things... and we'll have non-MCContext users (debug_line.dwo) shortly)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCDwarf.cpp')
-rw-r--r-- | lib/MC/MCDwarf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp index d1e24fd65f..2c1874f5e9 100644 --- a/lib/MC/MCDwarf.cpp +++ b/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]->Name); // 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]->DirIndex); + MCOS->EmitULEB128IntValue(MCDwarfFiles[i].DirIndex); MCOS->EmitIntValue(0, 1); // last modification timestamp (always 0) MCOS->EmitIntValue(0, 1); // filesize (always 0) } @@ -602,9 +602,9 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS, MCOS->EmitBytes(MCDwarfDirs[0]); MCOS->EmitBytes("/"); } - const SmallVectorImpl<MCDwarfFile *> &MCDwarfFiles = + const SmallVectorImpl<MCDwarfFile> &MCDwarfFiles = MCOS->getContext().getMCDwarfFiles(); - MCOS->EmitBytes(MCDwarfFiles[1]->Name); + 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. |