2015-08-06 02:27:44 +08:00
|
|
|
//===-- MachOUtils.h - Mach-o specific helpers for dsymutil --------------===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-08-06 02:27:44 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H
|
|
|
|
#define LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H
|
|
|
|
|
2019-01-08 07:27:25 +08:00
|
|
|
#include "SymbolMap.h"
|
|
|
|
|
2015-08-06 02:27:44 +08:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
2018-07-29 22:56:15 +08:00
|
|
|
#include "llvm/Support/FileSystem.h"
|
2019-01-08 07:27:25 +08:00
|
|
|
|
2018-02-22 19:32:51 +08:00
|
|
|
#include <string>
|
2015-08-06 02:27:44 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
2015-09-03 00:49:13 +08:00
|
|
|
class MCStreamer;
|
|
|
|
class raw_fd_ostream;
|
2015-08-06 02:27:44 +08:00
|
|
|
namespace dsymutil {
|
2015-09-03 00:49:13 +08:00
|
|
|
class DebugMap;
|
2015-08-06 02:27:44 +08:00
|
|
|
struct LinkOptions;
|
|
|
|
namespace MachOUtils {
|
|
|
|
|
2018-07-29 22:56:15 +08:00
|
|
|
struct ArchAndFile {
|
|
|
|
std::string Arch;
|
2019-06-06 01:14:32 +08:00
|
|
|
std::unique_ptr<llvm::sys::fs::TempFile> File;
|
2018-07-29 22:56:15 +08:00
|
|
|
|
|
|
|
llvm::Error createTempFile();
|
|
|
|
llvm::StringRef path() const;
|
|
|
|
|
|
|
|
ArchAndFile(StringRef Arch) : Arch(Arch) {}
|
|
|
|
ArchAndFile(ArchAndFile &&A) = default;
|
2019-06-06 01:14:32 +08:00
|
|
|
ArchAndFile &operator=(ArchAndFile &&A) = default;
|
2018-07-29 22:56:15 +08:00
|
|
|
~ArchAndFile();
|
2015-08-06 02:27:44 +08:00
|
|
|
};
|
|
|
|
|
2018-07-29 22:56:15 +08:00
|
|
|
bool generateUniversalBinary(SmallVectorImpl<ArchAndFile> &ArchFiles,
|
2015-10-09 06:35:53 +08:00
|
|
|
StringRef OutputFileName, const LinkOptions &,
|
|
|
|
StringRef SDKPath);
|
2015-08-26 07:15:26 +08:00
|
|
|
|
2019-01-08 07:27:25 +08:00
|
|
|
bool generateDsymCompanion(const DebugMap &DM, SymbolMapTranslator &Translator,
|
|
|
|
MCStreamer &MS, raw_fd_ostream &OutFile);
|
2015-09-03 00:49:13 +08:00
|
|
|
|
2015-08-26 07:15:26 +08:00
|
|
|
std::string getArchName(StringRef Arch);
|
2018-02-22 19:32:51 +08:00
|
|
|
} // namespace MachOUtils
|
|
|
|
} // namespace dsymutil
|
|
|
|
} // namespace llvm
|
2015-08-06 02:27:44 +08:00
|
|
|
#endif // LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H
|