mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-13 00:10:37 +00:00
![Frederic Riss](/assets/img/avatar_default.png)
This optimization allows the DWARF linker to reuse definition of types it has emitted in previous CUs rather than reemitting them in each CU that references them. The size and link time gains are huge. For example when linking the DWARF for a debug build of clang, this generates a ~150M dwarf file instead of a ~700M one (the numbers date back a bit and must not be totally accurate these days). As with all the other parts of the llvm-dsymutil codebase, the goal is to keep bit-for-bit compatibility with dsymutil-classic. The code is littered with a lot of FIXMEs that should be addressed once we can get rid of the compatibilty goal. llvm-svn: 242847
50 lines
1.7 KiB
C++
50 lines
1.7 KiB
C++
//===- tools/dsymutil/dsymutil.h - dsymutil high-level functionality ------===//
|
|
//
|
|
// The LLVM Linker
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
///
|
|
/// This file contains the class declaration for the code that parses STABS
|
|
/// debug maps that are embedded in the binaries symbol tables.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
|
|
#define LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
|
|
|
|
#include "DebugMap.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include "llvm/Support/ErrorOr.h"
|
|
#include <memory>
|
|
|
|
namespace llvm {
|
|
namespace dsymutil {
|
|
|
|
struct LinkOptions {
|
|
bool Verbose; ///< Verbosity
|
|
bool NoOutput; ///< Skip emitting output
|
|
bool NoODR; ///< Do not unique types according to ODR
|
|
|
|
LinkOptions() : Verbose(false), NoOutput(false) {}
|
|
};
|
|
|
|
/// \brief Extract the DebugMap from the given file.
|
|
/// The file has to be a MachO object file.
|
|
llvm::ErrorOr<std::unique_ptr<DebugMap>> parseDebugMap(StringRef InputFile,
|
|
StringRef PrependPath,
|
|
bool Verbose,
|
|
bool InputIsYAML);
|
|
|
|
/// \brief Link the Dwarf debuginfo as directed by the passed DebugMap
|
|
/// \p DM into a DwarfFile named \p OutputFilename.
|
|
/// \returns false if the link failed.
|
|
bool linkDwarf(StringRef OutputFilename, const DebugMap &DM,
|
|
const LinkOptions &Options);
|
|
}
|
|
}
|
|
#endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H
|