aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp')
-rw-r--r--contrib/libs/llvm12/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/contrib/libs/llvm12/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/contrib/libs/llvm12/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
index 3ab8869c2c..c6e43445e7 100644
--- a/contrib/libs/llvm12/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
+++ b/contrib/libs/llvm12/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
@@ -27,7 +27,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetMachine.h"
-#include <cstdint>
+#include <cstdint>
using namespace llvm;
#define DEBUG_TYPE "asm-printer"
@@ -98,12 +98,12 @@ static const char *DecodeDWARFEncoding(unsigned Encoding) {
case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata8
:
return "indirect pcrel sdata8";
- case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_datarel |
- dwarf::DW_EH_PE_sdata4:
- return "indirect datarel sdata4";
- case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_datarel |
- dwarf::DW_EH_PE_sdata8:
- return "indirect datarel sdata8";
+ case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_datarel |
+ dwarf::DW_EH_PE_sdata4:
+ return "indirect datarel sdata4";
+ case dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_datarel |
+ dwarf::DW_EH_PE_sdata8:
+ return "indirect datarel sdata8";
}
return "<unknown encoding>";
@@ -144,7 +144,7 @@ unsigned AsmPrinter::GetSizeOfEncodedValue(unsigned Encoding) const {
}
}
-void AsmPrinter::emitTTypeReference(const GlobalValue *GV, unsigned Encoding) {
+void AsmPrinter::emitTTypeReference(const GlobalValue *GV, unsigned Encoding) {
if (GV) {
const TargetLoweringObjectFile &TLOF = getObjFileLowering();
@@ -160,22 +160,22 @@ void AsmPrinter::emitDwarfSymbolReference(const MCSymbol *Label,
if (!ForceOffset) {
// On COFF targets, we have to emit the special .secrel32 directive.
if (MAI->needsDwarfSectionOffsetDirective()) {
- assert(!isDwarf64() &&
- "emitting DWARF64 is not implemented for COFF targets");
+ assert(!isDwarf64() &&
+ "emitting DWARF64 is not implemented for COFF targets");
OutStreamer->EmitCOFFSecRel32(Label, /*Offset=*/0);
return;
}
// If the format uses relocations with dwarf, refer to the symbol directly.
if (MAI->doesDwarfUseRelocationsAcrossSections()) {
- OutStreamer->emitSymbolValue(Label, getDwarfOffsetByteSize());
+ OutStreamer->emitSymbolValue(Label, getDwarfOffsetByteSize());
return;
}
}
// Otherwise, emit it as a label difference from the start of the section.
- emitLabelDifference(Label, Label->getSection().getBeginSymbol(),
- getDwarfOffsetByteSize());
+ emitLabelDifference(Label, Label->getSection().getBeginSymbol(),
+ getDwarfOffsetByteSize());
}
void AsmPrinter::emitDwarfStringOffset(DwarfStringPoolEntry S) const {
@@ -186,40 +186,40 @@ void AsmPrinter::emitDwarfStringOffset(DwarfStringPoolEntry S) const {
}
// Just emit the offset directly; no need for symbol math.
- OutStreamer->emitIntValue(S.Offset, getDwarfOffsetByteSize());
+ OutStreamer->emitIntValue(S.Offset, getDwarfOffsetByteSize());
}
void AsmPrinter::emitDwarfOffset(const MCSymbol *Label, uint64_t Offset) const {
- emitLabelPlusOffset(Label, Offset, getDwarfOffsetByteSize());
+ emitLabelPlusOffset(Label, Offset, getDwarfOffsetByteSize());
+}
+
+void AsmPrinter::emitDwarfLengthOrOffset(uint64_t Value) const {
+ assert(isDwarf64() || Value <= UINT32_MAX);
+ OutStreamer->emitIntValue(Value, getDwarfOffsetByteSize());
+}
+
+void AsmPrinter::maybeEmitDwarf64Mark() const {
+ if (!isDwarf64())
+ return;
+ OutStreamer->AddComment("DWARF64 Mark");
+ OutStreamer->emitInt32(dwarf::DW_LENGTH_DWARF64);
+}
+
+void AsmPrinter::emitDwarfUnitLength(uint64_t Length,
+ const Twine &Comment) const {
+ assert(isDwarf64() || Length <= dwarf::DW_LENGTH_lo_reserved);
+ maybeEmitDwarf64Mark();
+ OutStreamer->AddComment(Comment);
+ OutStreamer->emitIntValue(Length, getDwarfOffsetByteSize());
+}
+
+void AsmPrinter::emitDwarfUnitLength(const MCSymbol *Hi, const MCSymbol *Lo,
+ const Twine &Comment) const {
+ maybeEmitDwarf64Mark();
+ OutStreamer->AddComment(Comment);
+ OutStreamer->emitAbsoluteSymbolDiff(Hi, Lo, getDwarfOffsetByteSize());
}
-void AsmPrinter::emitDwarfLengthOrOffset(uint64_t Value) const {
- assert(isDwarf64() || Value <= UINT32_MAX);
- OutStreamer->emitIntValue(Value, getDwarfOffsetByteSize());
-}
-
-void AsmPrinter::maybeEmitDwarf64Mark() const {
- if (!isDwarf64())
- return;
- OutStreamer->AddComment("DWARF64 Mark");
- OutStreamer->emitInt32(dwarf::DW_LENGTH_DWARF64);
-}
-
-void AsmPrinter::emitDwarfUnitLength(uint64_t Length,
- const Twine &Comment) const {
- assert(isDwarf64() || Length <= dwarf::DW_LENGTH_lo_reserved);
- maybeEmitDwarf64Mark();
- OutStreamer->AddComment(Comment);
- OutStreamer->emitIntValue(Length, getDwarfOffsetByteSize());
-}
-
-void AsmPrinter::emitDwarfUnitLength(const MCSymbol *Hi, const MCSymbol *Lo,
- const Twine &Comment) const {
- maybeEmitDwarf64Mark();
- OutStreamer->AddComment(Comment);
- OutStreamer->emitAbsoluteSymbolDiff(Hi, Lo, getDwarfOffsetByteSize());
-}
-
void AsmPrinter::emitCallSiteOffset(const MCSymbol *Hi, const MCSymbol *Lo,
unsigned Encoding) const {
// The least significant 3 bits specify the width of the encoding