LLVM  14.0.0git
Namespaces | Functions | Variables
DWP.cpp File Reference
#include "llvm/DWP/DWP.h"
#include "llvm/DWP/DWPError.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/Object/Decompressor.h"
Include dependency graph for DWP.cpp:

Go to the source code of this file.

Namespaces

 llvm
 ---------------------— PointerInfo ------------------------------------—
 

Functions

static uint64_t debugStrOffsetsHeaderSize (DataExtractor StrOffsetsData, uint16_t DwarfVersion)
 
static uint64_t getCUAbbrev (StringRef Abbrev, uint64_t AbbrCode)
 
static Expected< const char * > getIndexedString (dwarf::Form Form, DataExtractor InfoData, uint64_t &InfoOffset, StringRef StrOffsets, StringRef Str, uint16_t Version)
 
static Expected< CompileUnitIdentifiersgetCUIdentifiers (InfoSectionUnitHeader &Header, StringRef Abbrev, StringRef Info, StringRef StrOffsets, StringRef Str)
 
static bool isSupportedSectionKind (DWARFSectionKind Kind)
 
unsigned llvm::getContributionIndex (DWARFSectionKind Kind, uint32_t IndexVersion)
 
static unsigned getOnDiskSectionId (unsigned Index)
 
static StringRef getSubsection (StringRef Section, const DWARFUnitIndex::Entry &Entry, DWARFSectionKind Kind)
 
static void addAllTypesFromDWP (MCStreamer &Out, MapVector< uint64_t, UnitIndexEntry > &TypeIndexEntries, const DWARFUnitIndex &TUIndex, MCSection *OutputTypes, StringRef Types, const UnitIndexEntry &TUEntry, uint32_t &TypesOffset, unsigned TypesContributionIndex)
 
static void addAllTypesFromTypesSection (MCStreamer &Out, MapVector< uint64_t, UnitIndexEntry > &TypeIndexEntries, MCSection *OutputTypes, const std::vector< StringRef > &TypesSections, const UnitIndexEntry &CUEntry, uint32_t &TypesOffset)
 
static std::string buildDWODescription (StringRef Name, StringRef DWPName, StringRef DWOName)
 
static Error createError (StringRef Name, Error E)
 
static Error handleCompressedSection (std::deque< SmallString< 32 >> &UncompressedSections, StringRef &Name, StringRef &Contents)
 
Expected< InfoSectionUnitHeaderllvm::parseInfoSectionUnitHeader (StringRef Info)
 
void llvm::writeStringsAndOffsets (MCStreamer &Out, DWPStringPool &Strings, MCSection *StrOffsetSection, StringRef CurStrSection, StringRef CurStrOffsetSection, uint16_t Version)
 
void llvm::writeIndexTable (MCStreamer &Out, ArrayRef< unsigned > ContributionOffsets, const MapVector< uint64_t, UnitIndexEntry > &IndexEntries, uint32_t DWARFUnitIndex::Entry::SectionContribution::*Field)
 
void llvm::writeIndex (MCStreamer &Out, MCSection *Section, ArrayRef< unsigned > ContributionOffsets, const MapVector< uint64_t, UnitIndexEntry > &IndexEntries, uint32_t IndexVersion)
 
Error llvm::buildDuplicateError (const std::pair< uint64_t, UnitIndexEntry > &PrevE, const CompileUnitIdentifiers &ID, StringRef DWPName)
 
Error llvm::handleSection (const StringMap< std::pair< MCSection *, DWARFSectionKind >> &KnownSections, const MCSection *StrSection, const MCSection *StrOffsetSection, const MCSection *TypesSection, const MCSection *CUIndexSection, const MCSection *TUIndexSection, const MCSection *InfoSection, const object::SectionRef &Section, MCStreamer &Out, std::deque< SmallString< 32 >> &UncompressedSections, uint32_t(&ContributionOffsets)[8], UnitIndexEntry &CurEntry, StringRef &CurStrSection, StringRef &CurStrOffsetSection, std::vector< StringRef > &CurTypesSection, std::vector< StringRef > &CurInfoSection, StringRef &AbbrevSection, StringRef &CurCUIndexSection, StringRef &CurTUIndexSection, std::vector< std::pair< DWARFSectionKind, uint32_t >> &SectionLength)
 
Error llvm::write (MCStreamer &Out, ArrayRef< std::string > Inputs)
 

Variables

static mc::RegisterMCTargetOptionsFlags MCTargetOptionsFlags
 

Function Documentation

◆ addAllTypesFromDWP()

static void addAllTypesFromDWP ( MCStreamer Out,
MapVector< uint64_t, UnitIndexEntry > &  TypeIndexEntries,
const DWARFUnitIndex TUIndex,
MCSection OutputTypes,
StringRef  Types,
const UnitIndexEntry TUEntry,
uint32_t TypesOffset,
unsigned  TypesContributionIndex 
)
static

◆ addAllTypesFromTypesSection()

static void addAllTypesFromTypesSection ( MCStreamer Out,
MapVector< uint64_t, UnitIndexEntry > &  TypeIndexEntries,
MCSection OutputTypes,
const std::vector< StringRef > &  TypesSections,
const UnitIndexEntry CUEntry,
uint32_t TypesOffset 
)
static

Definition at line 213 of file DWP.cpp.

References llvm::Data, Offset, and llvm::MCStreamer::SwitchSection().

◆ buildDWODescription()

static std::string buildDWODescription ( StringRef  Name,
StringRef  DWPName,
StringRef  DWOName 
)
static

Definition at line 247 of file DWP.cpp.

References llvm::StringRef::empty().

Referenced by llvm::buildDuplicateError().

◆ createError()

static Error createError ( StringRef  Name,
Error  E 
)
static

Definition at line 266 of file DWP.cpp.

References E, move, and llvm::toString().

◆ debugStrOffsetsHeaderSize()

static uint64_t debugStrOffsetsHeaderSize ( DataExtractor  StrOffsetsData,
uint16_t  DwarfVersion 
)
static

Definition at line 26 of file DWP.cpp.

References llvm::dwarf::DW_LENGTH_DWARF64, llvm::DataExtractor::getU32(), and Offset.

Referenced by getIndexedString().

◆ getCUAbbrev()

static uint64_t getCUAbbrev ( StringRef  Abbrev,
uint64_t  AbbrCode 
)
static

Definition at line 37 of file DWP.cpp.

References llvm::DataExtractor::getU8(), llvm::DataExtractor::getULEB128(), and Offset.

Referenced by getCUIdentifiers().

◆ getCUIdentifiers()

static Expected<CompileUnitIdentifiers> getCUIdentifiers ( InfoSectionUnitHeader Header,
StringRef  Abbrev,
StringRef  Info,
StringRef  StrOffsets,
StringRef  Str 
)
static

◆ getIndexedString()

static Expected<const char *> getIndexedString ( dwarf::Form  Form,
DataExtractor  InfoData,
uint64_t InfoOffset,
StringRef  StrOffsets,
StringRef  Str,
uint16_t  Version 
)
static

◆ getOnDiskSectionId()

static unsigned getOnDiskSectionId ( unsigned  Index)
static

Definition at line 165 of file DWP.cpp.

References Index.

Referenced by llvm::writeIndex().

◆ getSubsection()

static StringRef getSubsection ( StringRef  Section,
const DWARFUnitIndex::Entry Entry,
DWARFSectionKind  Kind 
)
static

Definition at line 169 of file DWP.cpp.

◆ handleCompressedSection()

static Error handleCompressedSection ( std::deque< SmallString< 32 >> &  UncompressedSections,
StringRef Name,
StringRef Contents 
)
static

◆ isSupportedSectionKind()

static bool isSupportedSectionKind ( DWARFSectionKind  Kind)
static

Definition at line 150 of file DWP.cpp.

References llvm::DW_SECT_EXT_unknown.

Variable Documentation

◆ MCTargetOptionsFlags

mc::RegisterMCTargetOptionsFlags MCTargetOptionsFlags
static

Definition at line 23 of file DWP.cpp.