#include "ObjDumper.h"
#include "llvm-readobj.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/Decompressor.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/Support/SystemZ/zOSSupport.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
namespace llvm {
static inline Error createError(const Twine &Msg) { … }
ObjDumper::ObjDumper(ScopedPrinter &Writer, StringRef ObjName) : … { … }
ObjDumper::~ObjDumper() { … }
void ObjDumper::reportUniqueWarning(Error Err) const { … }
void ObjDumper::reportUniqueWarning(const Twine &Msg) const { … }
static void printAsPrintable(raw_ostream &W, const uint8_t *Start, size_t Len) { … }
void ObjDumper::printAsStringList(StringRef StringContent,
size_t StringDataOffset) { … }
void ObjDumper::printFileSummary(StringRef FileStr, object::ObjectFile &Obj,
ArrayRef<std::string> InputFilenames,
const object::Archive *A) { … }
static std::vector<object::SectionRef>
getSectionRefsByNameOrIndex(const object::ObjectFile &Obj,
ArrayRef<std::string> Sections) { … }
static void maybeDecompress(const object::ObjectFile &Obj,
StringRef SectionName, StringRef &SectionContent,
SmallString<0> &Out) { … }
void ObjDumper::printSectionsAsString(const object::ObjectFile &Obj,
ArrayRef<std::string> Sections,
bool Decompress) { … }
void ObjDumper::printSectionsAsHex(const object::ObjectFile &Obj,
ArrayRef<std::string> Sections,
bool Decompress) { … }
}