mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Clear the uniquing table when initializing TLOF to avoid a crash when the TLOF is reinitialized with a different MCContext.
llvm-svn: 79253
This commit is contained in:
parent
afaae7957e
commit
d1c6b5de4e
@ -304,6 +304,8 @@ getELFSection(StringRef Section, unsigned Type, unsigned Flags,
|
|||||||
|
|
||||||
void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx,
|
void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx,
|
||||||
const TargetMachine &TM) {
|
const TargetMachine &TM) {
|
||||||
|
if (UniquingMap != 0)
|
||||||
|
((ELFUniqueMapTy*)UniquingMap)->clear();
|
||||||
TargetLoweringObjectFile::Initialize(Ctx, TM);
|
TargetLoweringObjectFile::Initialize(Ctx, TM);
|
||||||
|
|
||||||
BSSSection =
|
BSSSection =
|
||||||
@ -666,6 +668,8 @@ getMachOSection(const StringRef &Segment, const StringRef &Section,
|
|||||||
|
|
||||||
void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
|
void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
|
||||||
const TargetMachine &TM) {
|
const TargetMachine &TM) {
|
||||||
|
if (UniquingMap != 0)
|
||||||
|
((MachOUniqueMapTy*)UniquingMap)->clear();
|
||||||
TargetLoweringObjectFile::Initialize(Ctx, TM);
|
TargetLoweringObjectFile::Initialize(Ctx, TM);
|
||||||
|
|
||||||
TextSection // .text
|
TextSection // .text
|
||||||
@ -946,6 +950,8 @@ getCOFFSection(const char *Name, bool isDirective, SectionKind Kind) const {
|
|||||||
|
|
||||||
void TargetLoweringObjectFileCOFF::Initialize(MCContext &Ctx,
|
void TargetLoweringObjectFileCOFF::Initialize(MCContext &Ctx,
|
||||||
const TargetMachine &TM) {
|
const TargetMachine &TM) {
|
||||||
|
if (UniquingMap != 0)
|
||||||
|
((COFFUniqueMapTy*)UniquingMap)->clear();
|
||||||
TargetLoweringObjectFile::Initialize(Ctx, TM);
|
TargetLoweringObjectFile::Initialize(Ctx, TM);
|
||||||
TextSection = getCOFFSection("\t.text", true, SectionKind::getText());
|
TextSection = getCOFFSection("\t.text", true, SectionKind::getText());
|
||||||
DataSection = getCOFFSection("\t.data", true, SectionKind::getDataRel());
|
DataSection = getCOFFSection("\t.data", true, SectionKind::getDataRel());
|
||||||
|
Loading…
Reference in New Issue
Block a user