1//===- tools/dsymutil/dsymutil.h - dsymutil high-level functionality ------===//
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/// \file
10///
11/// This file contains the class declaration for the code that parses STABS
12/// debug maps that are embedded in the binaries symbol tables.
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
17#define LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
18
19#include "DebugMap.h"
20#include "LinkUtils.h"
21#include "llvm/ADT/ArrayRef.h"
22#include "llvm/ADT/StringRef.h"
23#include "llvm/Support/Compiler.h"
24#include "llvm/Support/ErrorOr.h"
25#include <memory>
26#include <string>
27#include <vector>
28
29namespace llvm {
30namespace dsymutil {
31
32/// Extract the DebugMaps from the given file.
33/// The file has to be a MachO object file. Multiple debug maps can be
34/// returned when the file is universal (aka fat) binary.
35ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
36parseDebugMap(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS,
37 StringRef InputFile, ArrayRef<std::string> Archs,
38 ArrayRef<std::string> DSYMSearchPaths, StringRef PrependPath,
39 StringRef VariantSuffix, bool Verbose, bool InputIsYAML);
40
41/// Dump the symbol table.
42bool dumpStab(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS,
43 StringRef InputFile, ArrayRef<std::string> Archs,
44 ArrayRef<std::string> DSYMSearchPaths, StringRef PrependPath = "",
45 StringRef VariantSuffix = "");
46
47} // end namespace dsymutil
48} // end namespace llvm
49
50#endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
51