xref: /freebsd/contrib/llvm-project/llvm/tools/llvm-objdump/XCOFFDump.h (revision e32fecd0c2c3ee37c47ee100f169e7eb0282a873)
1 //===-- XCOFFDump.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_TOOLS_LLVM_OBJDUMP_XCOFFDUMP_H
10 #define LLVM_TOOLS_LLVM_OBJDUMP_XCOFFDUMP_H
11 
12 #include "llvm/Object/XCOFFObjectFile.h"
13 
14 namespace llvm {
15 
16 struct SymbolInfoTy;
17 
18 namespace objdump {
19 Optional<XCOFF::StorageMappingClass>
20 getXCOFFSymbolCsectSMC(const object::XCOFFObjectFile &Obj,
21                        const object::SymbolRef &Sym);
22 
23 Optional<object::SymbolRef>
24 getXCOFFSymbolContainingSymbolRef(const object::XCOFFObjectFile &Obj,
25                                   const object::SymbolRef &Sym);
26 
27 bool isLabel(const object::XCOFFObjectFile &Obj, const object::SymbolRef &Sym);
28 
29 std::string getXCOFFSymbolDescription(const SymbolInfoTy &SymbolInfo,
30                                       StringRef SymbolName);
31 
32 Error getXCOFFRelocationValueString(const object::XCOFFObjectFile &Obj,
33                                     const object::RelocationRef &RelRef,
34                                     llvm::SmallVectorImpl<char> &Result);
35 } // namespace objdump
36 } // namespace llvm
37 #endif
38