2015-08-06 02:27:44 +08:00
|
|
|
//===-- MachOUtils.h - Mach-o specific helpers for dsymutil --------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H
|
|
|
|
#define LLVM_TOOLS_DSYMUTIL_MACHOUTILS_H
|
|
|
|
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
2018-07-29 22:56:15 +08:00
|
|
|
#include "llvm/Support/FileSystem.h"
|
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;
|
|
|
|
// Optional because TempFile has no default constructor.
|
|
|
|
Optional<llvm::sys::fs::TempFile> File;
|
|
|
|
|
|
|
|
llvm::Error createTempFile();
|
|
|
|
llvm::StringRef path() const;
|
|
|
|
|
|
|
|
ArchAndFile(StringRef Arch) : Arch(Arch) {}
|
|
|
|
ArchAndFile(ArchAndFile &&A) = default;
|
|
|
|
~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
|
|
|
|
2015-09-03 00:49:13 +08:00
|
|
|
bool generateDsymCompanion(const DebugMap &DM, MCStreamer &MS,
|
|
|
|
raw_fd_ostream &OutFile);
|
|
|
|
|
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
|