summaryrefslogtreecommitdiff
path: root/tools/yaml2obj/yaml2elf.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-05-31 04:51:07 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-05-31 04:51:07 +0000
commitdf96c562a5f9a53287689b426896080c72a85785 (patch)
treec8b2c763c1d335383d894874edfe13e27f2b34f0 /tools/yaml2obj/yaml2elf.cpp
parent44c63540158fe25f33a14e2b4758fb4a88890fd9 (diff)
downloadllvm-df96c562a5f9a53287689b426896080c72a85785.tar.gz
llvm-df96c562a5f9a53287689b426896080c72a85785.tar.bz2
llvm-df96c562a5f9a53287689b426896080c72a85785.tar.xz
[yaml2obj] Add new command line option `-docnum`.
Input YAML file might contain multiple object file definitions. New option `-docnum` allows to specify an ordinal number (starting from 1) of definition used for an object file generation. Patch reviewed by Sean Silva. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/yaml2obj/yaml2elf.cpp')
-rw-r--r--tools/yaml2obj/yaml2elf.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp
index bb52cda7c1..11a56469b0 100644
--- a/tools/yaml2obj/yaml2elf.cpp
+++ b/tools/yaml2obj/yaml2elf.cpp
@@ -467,8 +467,7 @@ static bool isLittleEndian(const ELFYAML::Object &Doc) {
return Doc.Header.Data == ELFYAML::ELF_ELFDATA(ELF::ELFDATA2LSB);
}
-int yaml2elf(llvm::raw_ostream &Out, llvm::MemoryBuffer *Buf) {
- yaml::Input YIn(Buf->getBuffer());
+int yaml2elf(yaml::Input &YIn, raw_ostream &Out) {
ELFYAML::Object Doc;
YIn >> Doc;
if (YIn.error()) {