MC: De-duplicate the object streamer implementations of EmitFileDirective into MCObjectStreamer. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Collingbourne
2017-03-03 21:22:06 +00:00
parent ad76c97fd9
commit 6387bdabf7
10 changed files with 7 additions and 30 deletions
+2
View File
@@ -902,6 +902,8 @@ void ELFObjectWriter::computeSymbolTable(
StrTabBuilder.finalize();
// File symbols are emitted first and handled separately from normal symbols,
// i.e. a non-STT_FILE symbol with the same name may appear.
for (const std::string &Name : FileNames)
Writer.writeSymbol(StrTabBuilder.getOffset(Name),
ELF::STT_FILE | ELF::STB_LOCAL, 0, 0, ELF::STV_DEFAULT,