[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / llvm / tools / obj2yaml / minidump2yaml.cpp
blob7b25b1869c6b6ad533f691b9930950a43a193d00
1 //===- minidump2yaml.cpp - Minidump to yaml conversion tool -----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "obj2yaml.h"
10 #include "llvm/Object/Minidump.h"
11 #include "llvm/ObjectYAML/MinidumpYAML.h"
12 #include "llvm/Support/YAMLTraits.h"
14 using namespace llvm;
16 Error minidump2yaml(raw_ostream &Out, const object::MinidumpFile &Obj) {
17 auto ExpectedObject = MinidumpYAML::Object::create(Obj);
18 if (!ExpectedObject)
19 return ExpectedObject.takeError();
20 yaml::Output Output(Out);
21 Output << *ExpectedObject;
22 return llvm::Error::success();