mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
MC: permit emitting a symbol value as section relative
This adds an optional parameter to the EmitSymbolValue method in MCStreamer to permit emitting a symbol value as a section relative value. This is to cover the use in MCDwarf which should not really know about how to emit a section relative value for a given target. This addresses post-review comments from Eric Christopher in SVN r213275. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -655,14 +655,14 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,
|
||||
// The 2 byte DWARF version.
|
||||
MCOS->EmitIntValue(context.getDwarfVersion(), 2);
|
||||
|
||||
const MCAsmInfo &AsmInfo = *context.getAsmInfo();
|
||||
// The 4 byte offset to the debug abbrevs from the start of the .debug_abbrev,
|
||||
// it is at the start of that section so this is zero.
|
||||
if (AbbrevSectionSymbol == nullptr)
|
||||
MCOS->EmitIntValue(0, 4);
|
||||
else if (context.getAsmInfo()->needsDwarfSectionOffsetDirective())
|
||||
MCOS->EmitCOFFSecRel32(AbbrevSectionSymbol);
|
||||
else
|
||||
MCOS->EmitSymbolValue(AbbrevSectionSymbol, 4);
|
||||
MCOS->EmitSymbolValue(AbbrevSectionSymbol, 4,
|
||||
AsmInfo.needsDwarfSectionOffsetDirective());
|
||||
|
||||
const MCAsmInfo *asmInfo = context.getAsmInfo();
|
||||
int AddrSize = asmInfo->getPointerSize();
|
||||
|
Reference in New Issue
Block a user