mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Revert r201622 and r201608.
This causes the LLVMgold plugin to segfault. More information on the replies to r201608. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201669 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -11,25 +11,23 @@
|
||||
#include "MCTargetDesc/SparcMCExpr.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
|
||||
#include "llvm/Support/Dwarf.h"
|
||||
#include "llvm/Target/TargetLowering.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
const MCExpr *SparcELFTargetObjectFile::getTTypeGlobalReference(
|
||||
const GlobalValue *GV, unsigned Encoding, Mangler &Mang,
|
||||
const TargetMachine &TM, MachineModuleInfo *MMI,
|
||||
MCStreamer &Streamer) const {
|
||||
MachineModuleInfo *MMI, MCStreamer &Streamer) const {
|
||||
|
||||
if (Encoding & dwarf::DW_EH_PE_pcrel) {
|
||||
MachineModuleInfoELF &ELFMMI = MMI->getObjFileInfo<MachineModuleInfoELF>();
|
||||
|
||||
MCSymbol *SSym = getSymbolWithGlobalValueBase(GV, ".DW.stub", Mang, TM);
|
||||
MCSymbol *SSym = getSymbolWithGlobalValueBase(GV, ".DW.stub", Mang);
|
||||
|
||||
// Add information about the stub reference to ELFMMI so that the stub
|
||||
// gets emitted by the asmprinter.
|
||||
MachineModuleInfoImpl::StubValueTy &StubSym = ELFMMI.getGVStubEntry(SSym);
|
||||
if (StubSym.getPointer() == 0) {
|
||||
MCSymbol *Sym = TM.getTargetLowering()->getSymbol(GV, Mang);
|
||||
MCSymbol *Sym = getSymbol(GV, Mang);
|
||||
StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
|
||||
}
|
||||
|
||||
@ -39,5 +37,5 @@ const MCExpr *SparcELFTargetObjectFile::getTTypeGlobalReference(
|
||||
}
|
||||
|
||||
return TargetLoweringObjectFileELF::getTTypeGlobalReference(
|
||||
GV, Encoding, Mang, TM, MMI, Streamer);
|
||||
GV, Encoding, Mang, MMI, Streamer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user