[yaml2obj] Add "-o" command line option to specify an output file name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208900 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Atanasyan
2014-05-15 16:14:02 +00:00
parent 70e3aba855
commit 926273d496
4 changed files with 37 additions and 11 deletions
+4 -4
View File
@@ -477,13 +477,13 @@ int yaml2elf(llvm::raw_ostream &Out, llvm::MemoryBuffer *Buf) {
typedef ELFType<support::big, 4, false> BE32;
if (is64Bit(Doc)) {
if (isLittleEndian(Doc))
return ELFState<LE64>::writeELF(outs(), Doc);
return ELFState<LE64>::writeELF(Out, Doc);
else
return ELFState<BE64>::writeELF(outs(), Doc);
return ELFState<BE64>::writeELF(Out, Doc);
} else {
if (isLittleEndian(Doc))
return ELFState<LE32>::writeELF(outs(), Doc);
return ELFState<LE32>::writeELF(Out, Doc);
else
return ELFState<BE32>::writeELF(outs(), Doc);
return ELFState<BE32>::writeELF(Out, Doc);
}
}