#include "llvm/ADT/APInt.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Object/MachO.h"
#include "llvm/Object/MachOUniversal.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
#include <system_error>
usingnamespacellvm;
usingnamespaceobject;
namespace {
usingnamespacellvm::opt;
enum ID { … };
#define PREFIX …
#include "Opts.inc"
#undef PREFIX
static constexpr opt::OptTable::Info InfoTable[] = …;
class SizeOptTable : public opt::GenericOptTable { … };
enum OutputFormatTy { … };
enum RadixTy { … };
}
static bool ArchAll = …;
static std::vector<StringRef> ArchFlags;
static bool ELFCommons;
static OutputFormatTy OutputFormat;
static bool DarwinLongFormat;
static RadixTy Radix;
static bool TotalSizes;
static std::vector<std::string> InputFilenames;
static std::string ToolName;
static bool HadError = …;
static bool BerkeleyHeaderPrinted = …;
static bool MoreThanOneFile = …;
static uint64_t TotalObjectText = …;
static uint64_t TotalObjectData = …;
static uint64_t TotalObjectBss = …;
static uint64_t TotalObjectTotal = …;
static void error(const Twine &Message, StringRef File = "") { … }
static void error(llvm::Error E, StringRef FileName, const Archive::Child &C,
StringRef ArchitectureName = StringRef()) { … }
static void error(llvm::Error E, StringRef FileName,
StringRef ArchitectureName = StringRef()) { … }
static size_t getNumLengthAsString(uint64_t num) { … }
static const char *getRadixFmt() { … }
static bool considerForSize(ObjectFile *Obj, SectionRef Section) { … }
static Expected<uint64_t> getCommonSize(ObjectFile *Obj) { … }
static void printDarwinSectionSizes(MachOObjectFile *MachO) { … }
static void printDarwinSegmentSizes(MachOObjectFile *MachO) { … }
static void printObjectSectionSizes(ObjectFile *Obj) { … }
static bool checkMachOAndArchFlags(ObjectFile *O, StringRef Filename) { … }
static void printFileSectionSizes(StringRef file) { … }
static void printBerkeleyTotals() { … }
int llvm_size_main(int argc, char **argv, const llvm::ToolContext &) { … }