1 //===- ObjectFileTransformer.h ----------------------------------*- 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 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H 10 #define LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H 11 12 #include "llvm/Support/Error.h" 13 14 namespace llvm { 15 16 namespace object { 17 class ObjectFile; 18 } 19 20 namespace gsym { 21 22 class GsymCreator; 23 class OutputAggregator; 24 25 class ObjectFileTransformer { 26 public: 27 /// Extract any object file data that is needed by the GsymCreator. 28 /// 29 /// The extracted information includes the UUID of the binary and converting 30 /// all function symbols from any symbol tables into FunctionInfo objects. 31 /// 32 /// \param Obj The object file that contains the DWARF debug info. 33 /// 34 /// \param Log The stream to log warnings and non fatal issues to. If NULL, 35 /// don't log. 36 /// 37 /// \param Gsym The GSYM creator to populate with the function information 38 /// from the debug info. 39 /// 40 /// \returns An error indicating any fatal issues that happen when parsing 41 /// the DWARF, or Error::success() if all goes well. 42 static llvm::Error convert(const object::ObjectFile &Obj, 43 OutputAggregator &Output, GsymCreator &Gsym); 44 }; 45 46 } // namespace gsym 47 } // namespace llvm 48 49 #endif // LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H 50