12f6cc21fSGreg Clayton //===- ObjectFileTransformer.h ----------------------------------*- C++ -*-===// 22f6cc21fSGreg Clayton // 32f6cc21fSGreg Clayton // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42f6cc21fSGreg Clayton // See https://llvm.org/LICENSE.txt for license information. 52f6cc21fSGreg Clayton // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 62f6cc21fSGreg Clayton // 72f6cc21fSGreg Clayton //===----------------------------------------------------------------------===// 82f6cc21fSGreg Clayton 92f6cc21fSGreg Clayton #ifndef LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H 102f6cc21fSGreg Clayton #define LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H 112f6cc21fSGreg Clayton 122f6cc21fSGreg Clayton #include "llvm/Support/Error.h" 132f6cc21fSGreg Clayton 142f6cc21fSGreg Clayton namespace llvm { 152f6cc21fSGreg Clayton 162f6cc21fSGreg Clayton class raw_ostream; 172f6cc21fSGreg Clayton 182f6cc21fSGreg Clayton namespace object { 192f6cc21fSGreg Clayton class ObjectFile; 202f6cc21fSGreg Clayton } 212f6cc21fSGreg Clayton 222f6cc21fSGreg Clayton namespace gsym { 232f6cc21fSGreg Clayton 242f6cc21fSGreg Clayton class GsymCreator; 252f6cc21fSGreg Clayton 262f6cc21fSGreg Clayton class ObjectFileTransformer { 272f6cc21fSGreg Clayton public: 282f6cc21fSGreg Clayton /// Extract any object file data that is needed by the GsymCreator. 292f6cc21fSGreg Clayton /// 302f6cc21fSGreg Clayton /// The extracted information includes the UUID of the binary and converting 312f6cc21fSGreg Clayton /// all function symbols from any symbol tables into FunctionInfo objects. 322f6cc21fSGreg Clayton /// 332f6cc21fSGreg Clayton /// \param Obj The object file that contains the DWARF debug info. 342f6cc21fSGreg Clayton /// 352f6cc21fSGreg Clayton /// \param Log The stream to log warnings and non fatal issues to. 362f6cc21fSGreg Clayton /// 372f6cc21fSGreg Clayton /// \param Gsym The GSYM creator to populate with the function information 382f6cc21fSGreg Clayton /// from the debug info. 392f6cc21fSGreg Clayton /// 402f6cc21fSGreg Clayton /// \returns An error indicating any fatal issues that happen when parsing 412f6cc21fSGreg Clayton /// the DWARF, or Error::success() if all goes well. 422f6cc21fSGreg Clayton static llvm::Error convert(const object::ObjectFile &Obj, 432f6cc21fSGreg Clayton raw_ostream &Log, 442f6cc21fSGreg Clayton GsymCreator &Gsym); 452f6cc21fSGreg Clayton }; 462f6cc21fSGreg Clayton 472f6cc21fSGreg Clayton } // namespace gsym 482f6cc21fSGreg Clayton } // namespace llvm 492f6cc21fSGreg Clayton 50*aa5c09beSKazu Hirata #endif // LLVM_DEBUGINFO_GSYM_OBJECTFILETRANSFORMER_H 51