LLVM  14.0.0git
Classes | Namespaces | Functions
MCDwarf.cpp File Reference
#include "llvm/MC/MCDwarf.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/Config/config.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for MCDwarf.cpp:

Go to the source code of this file.


struct  llvm::DenseMapInfo< CIEKey >


 This is an optimization pass for GlobalISel generic memory operations.


static uint64_t ScaleAddrDelta (MCContext &Context, uint64_t AddrDelta)
static const MCExprmakeEndMinusStartExpr (MCContext &Ctx, const MCSymbol &Start, const MCSymbol &End, int IntVal)
static const MCExprmakeStartPlusIntExpr (MCContext &Ctx, const MCSymbol &Start, int IntVal)
static const MCExprforceExpAbs (MCStreamer &OS, const MCExpr *Expr)
static void emitAbsValue (MCStreamer &OS, const MCExpr *Value, unsigned Size)
static void emitOneV5FileEntry (MCStreamer *MCOS, const MCDwarfFile &DwarfFile, bool EmitMD5, bool HasSource, Optional< MCDwarfLineStr > &LineStr)
static bool isRootFile (const MCDwarfFile &RootFile, StringRef &Directory, StringRef &FileName, Optional< MD5::MD5Result > Checksum)
static uint64_t SpecialAddr (MCDwarfLineTableParams Params, uint64_t op)
 Given a special op, return the address skip amount (in units of DWARF2_LINE_MIN_INSN_LENGTH). More...
static void EmitAbbrev (MCStreamer *MCOS, uint64_t Name, uint64_t Form)
static void EmitGenDwarfAbbrev (MCStreamer *MCOS)
static void EmitGenDwarfAranges (MCStreamer *MCOS, const MCSymbol *InfoSectionSymbol)
static void EmitGenDwarfInfo (MCStreamer *MCOS, const MCSymbol *AbbrevSectionSymbol, const MCSymbol *LineSectionSymbol, const MCSymbol *RangesSymbol)
static MCSymbolemitGenDwarfRanges (MCStreamer *MCOS)
static int getDataAlignmentFactor (MCStreamer &streamer)
static unsigned getSizeForEncoding (MCStreamer &streamer, unsigned symbolEncoding)
static void emitFDESymbol (MCObjectStreamer &streamer, const MCSymbol &symbol, unsigned symbolEncoding, bool isEH)
static void EmitPersonality (MCStreamer &streamer, const MCSymbol &symbol, unsigned symbolEncoding)
static void emitEncodingByte (MCObjectStreamer &Streamer, unsigned Encoding)
static unsigned getCIEVersion (bool IsEH, unsigned DwarfVersion)

Function Documentation

◆ EmitAbbrev()

static void EmitAbbrev ( MCStreamer MCOS,
uint64_t  Name,
uint64_t  Form 

Definition at line 758 of file MCDwarf.cpp.

References llvm::MCStreamer::emitULEB128IntValue().

Referenced by EmitGenDwarfAbbrev().

◆ emitAbsValue()

static void emitAbsValue ( MCStreamer OS,
const MCExpr Value,
unsigned  Size 

◆ emitEncodingByte()

static void emitEncodingByte ( MCObjectStreamer Streamer,
unsigned  Encoding 

Definition at line 1309 of file MCDwarf.cpp.

References llvm::MCStreamer::emitInt8().

◆ emitFDESymbol()

static void emitFDESymbol ( MCObjectStreamer streamer,
const MCSymbol symbol,
unsigned  symbolEncoding,
bool  isEH 

◆ EmitGenDwarfAbbrev()

static void EmitGenDwarfAbbrev ( MCStreamer MCOS)

◆ EmitGenDwarfAranges()

static void EmitGenDwarfAranges ( MCStreamer MCOS,
const MCSymbol InfoSectionSymbol 

◆ EmitGenDwarfInfo()

static void EmitGenDwarfInfo ( MCStreamer MCOS,
const MCSymbol AbbrevSectionSymbol,
const MCSymbol LineSectionSymbol,
const MCSymbol RangesSymbol 

◆ emitGenDwarfRanges()

static MCSymbol* emitGenDwarfRanges ( MCStreamer MCOS)

◆ emitOneV5FileEntry()

static void emitOneV5FileEntry ( MCStreamer MCOS,
const MCDwarfFile DwarfFile,
bool  EmitMD5,
bool  HasSource,
Optional< MCDwarfLineStr > &  LineStr 

◆ EmitPersonality()

static void EmitPersonality ( MCStreamer streamer,
const MCSymbol symbol,
unsigned  symbolEncoding 

◆ forceExpAbs()

static const MCExpr* forceExpAbs ( MCStreamer OS,
const MCExpr Expr 

◆ getCIEVersion()

static unsigned getCIEVersion ( bool  IsEH,
unsigned  DwarfVersion 

Definition at line 1542 of file MCDwarf.cpp.

References llvm_unreachable.

◆ getDataAlignmentFactor()

static int getDataAlignmentFactor ( MCStreamer streamer)

◆ getSizeForEncoding()

static unsigned getSizeForEncoding ( MCStreamer streamer,
unsigned  symbolEncoding 

◆ isRootFile()

static bool isRootFile ( const MCDwarfFile RootFile,
StringRef Directory,
StringRef FileName,
Optional< MD5::MD5Result Checksum 

◆ makeEndMinusStartExpr()

static const MCExpr* makeEndMinusStartExpr ( MCContext Ctx,
const MCSymbol Start,
const MCSymbol End,
int  IntVal 

Definition at line 119 of file MCDwarf.cpp.

Referenced by EmitGenDwarfAranges(), EmitGenDwarfInfo(), and emitGenDwarfRanges().

◆ makeStartPlusIntExpr()

static const MCExpr* makeStartPlusIntExpr ( MCContext Ctx,
const MCSymbol Start,
int  IntVal 

Definition at line 136 of file MCDwarf.cpp.

Referenced by llvm::MCDwarfLineStr::emitRef().

◆ ScaleAddrDelta()

static uint64_t ScaleAddrDelta ( MCContext Context,
uint64_t  AddrDelta 

Definition at line 68 of file MCDwarf.cpp.

References Context.

Referenced by llvm::MCDwarfLineAddr::Encode(), and llvm::MCDwarfFrameEmitter::EncodeAdvanceLoc().

◆ SpecialAddr()

static uint64_t SpecialAddr ( MCDwarfLineTableParams  Params,
uint64_t  op 

Given a special op, return the address skip amount (in units of DWARF2_LINE_MIN_INSN_LENGTH).

Definition at line 670 of file MCDwarf.cpp.

References llvm::MCDwarfLineTableParams::DWARF2LineOpcodeBase, llvm::MCDwarfLineTableParams::DWARF2LineRange, and op.

Referenced by llvm::MCDwarfLineAddr::Encode().