summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/WriterMachO.cpp
diff options
context:
space:
mode:
authorHemant Kulkarni <khemant@codeaurora.org>2012-09-14 16:11:34 +0000
committerHemant Kulkarni <khemant@codeaurora.org>2012-09-14 16:11:34 +0000
commit927bbc287163ff7c3a27066255bfd905e0dfd8c6 (patch)
tree77986bc874b2714796efec47802b2a97a075d4d2 /lld/lib/ReaderWriter/MachO/WriterMachO.cpp
parent578865b73c39270ce7562040ec717ed8aef29bcf (diff)
downloadbcm5719-llvm-927bbc287163ff7c3a27066255bfd905e0dfd8c6.tar.gz
bcm5719-llvm-927bbc287163ff7c3a27066255bfd905e0dfd8c6.zip
ELF support for LLD writer. The writer at present emits ELF header and section
table header. Skeleton code for ReferenceKinds. Credits: Doxygen by Michael Spencer. Origianl implementation from Macho by Sidney Manning. Templatization, implementation of section header chunks, string table, ELF header by Hemant Kulkarni. llvm-svn: 163906
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/WriterMachO.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/WriterMachO.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lld/lib/ReaderWriter/MachO/WriterMachO.cpp b/lld/lib/ReaderWriter/MachO/WriterMachO.cpp
index 06a708f563d..bd2b9bbc61b 100644
--- a/lld/lib/ReaderWriter/MachO/WriterMachO.cpp
+++ b/lld/lib/ReaderWriter/MachO/WriterMachO.cpp
@@ -11,7 +11,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
-//#include "llvm/Support/FileOutputBuffer.h"
+#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/system_error.h"
@@ -1501,7 +1501,6 @@ error_code MachOWriter::writeFile(const lld::File &file, StringRef path) {
this->build(file);
// FIXME: re-enable when FileOutputBuffer is in LLVMSupport.a
-#if 0
uint64_t totalSize = _chunks.back()->fileOffset() + _chunks.back()->size();
OwningPtr<llvm::FileOutputBuffer> buffer;
@@ -1523,9 +1522,7 @@ error_code MachOWriter::writeFile(const lld::File &file, StringRef path) {
}
return buffer->commit();
-#else
return error_code::success();
-#endif
}
OpenPOWER on IntegriCloud