mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Revert "debuginfo: Use symbol difference for CU length to simplify assembly reading/editing"
Temporarily reverts commit r348806 due to strange asm compilation issues in certain modes (combination of asan+cuda+other things). Will provide repro soon. llvm-svn: 348898
This commit is contained in:
parent
b0b0885d0f
commit
446597031d
@ -46,8 +46,6 @@ void DwarfFile::emitUnit(DwarfUnit *TheU, bool UseOffsets) {
|
||||
TheU->emitHeader(UseOffsets);
|
||||
|
||||
Asm->emitDwarfDIE(Die);
|
||||
|
||||
Asm->OutStreamer->EmitLabel(TheU->getEndLabel());
|
||||
}
|
||||
|
||||
// Compute the size and offset for each DIE.
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
@ -1554,17 +1553,7 @@ DIE *DwarfUnit::getOrCreateStaticMemberDIE(const DIDerivedType *DT) {
|
||||
void DwarfUnit::emitCommonHeader(bool UseOffsets, dwarf::UnitType UT) {
|
||||
// Emit size of content not including length itself
|
||||
Asm->OutStreamer->AddComment("Length of Unit");
|
||||
StringRef Prefix = isDwoUnit() ? "debug_info_dwo_" : "debug_info_";
|
||||
MCSymbol *BeginLabel = Asm->createTempSymbol(Prefix + "start");
|
||||
EndLabel = Asm->createTempSymbol(Prefix + "end");
|
||||
|
||||
// Use a label difference for the convenience of legible/easily modified
|
||||
// assembly - except on NVPTX where label differences aren't supported.
|
||||
if (Asm->TM.getTargetTriple().isNVPTX())
|
||||
Asm->emitInt32(getHeaderSize() + getUnitDie().getSize());
|
||||
else
|
||||
Asm->EmitLabelDifference(EndLabel, BeginLabel, 4);
|
||||
Asm->OutStreamer->EmitLabel(BeginLabel);
|
||||
Asm->emitInt32(getHeaderSize() + getUnitDie().getSize());
|
||||
|
||||
Asm->OutStreamer->AddComment("DWARF version number");
|
||||
unsigned Version = DD->getDwarfVersion();
|
||||
|
@ -48,7 +48,6 @@ protected:
|
||||
|
||||
/// Target of Dwarf emission.
|
||||
AsmPrinter *Asm;
|
||||
MCSymbol *EndLabel;
|
||||
|
||||
// Holders for some common dwarf information.
|
||||
DwarfDebug *DD;
|
||||
@ -83,7 +82,6 @@ protected:
|
||||
public:
|
||||
// Accessors.
|
||||
AsmPrinter* getAsmPrinter() const { return Asm; }
|
||||
MCSymbol *getEndLabel() const { return EndLabel; }
|
||||
uint16_t getLanguage() const { return CUNode->getSourceLanguage(); }
|
||||
const DICompileUnit *getCUNode() const { return CUNode; }
|
||||
|
||||
|
@ -9,19 +9,13 @@
|
||||
; CHECK-NOT: .L
|
||||
|
||||
; CHECK: .section .debug_info
|
||||
; CHECK-NEXT: .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
||||
; CHECK-NEXT: .Ldebug_info_start0:
|
||||
; CHECK-NEXT: .short 2 # DWARF version number
|
||||
; CHECK-NOT: .L
|
||||
; CHECK: .short 2 # DWARF version number
|
||||
; CHECK-NOT: .L
|
||||
; CHECK: .long .debug_abbrev # Offset Into Abbrev. Section
|
||||
; CHECK-NOT: .L
|
||||
; CHECK: .long .debug_line # DW_AT_stmt_list
|
||||
; CHECK-NOT: .L
|
||||
; CHECK: .Ldebug_info_end0:
|
||||
; CHECK-NOT: .L
|
||||
; CHECK: .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
|
||||
; CHECK-NEXT: .Ldebug_info_start1:
|
||||
; CHECK-NOT: .L
|
||||
; CHECK: .long .debug_abbrev # Offset Into Abbrev. Section
|
||||
; CHECK-NOT: .L
|
||||
; CHECK: .long .debug_line # DW_AT_stmt_list
|
||||
@ -29,7 +23,6 @@
|
||||
; CHECK: .quad .debug_info+{{[0-9]+}} # DW_AT_type
|
||||
; CHECK-NOT: .L
|
||||
; CHECK: .byte 0 # End Of Children Mark
|
||||
; CHECK-NEXT: .Ldebug_info_end1:
|
||||
; CHECK-NOT: .L
|
||||
|
||||
source_filename = "test/DebugInfo/X86/sections_as_references.ll"
|
||||
|
Loading…
Reference in New Issue
Block a user