mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Make TOC order deterministic by using MapVector instead of DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cbf9ffc93c
commit
95d8afc5f2
@ -54,12 +54,13 @@
|
||||
#include "llvm/Support/ELF.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/MapVector.h"
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
class PPCAsmPrinter : public AsmPrinter {
|
||||
protected:
|
||||
DenseMap<MCSymbol*, MCSymbol*> TOC;
|
||||
MapVector<MCSymbol*, MCSymbol*> TOC;
|
||||
const PPCSubtarget &Subtarget;
|
||||
uint64_t TOCLabelID;
|
||||
public:
|
||||
@ -465,8 +466,7 @@ bool PPCLinuxAsmPrinter::doFinalization(Module &M) {
|
||||
SectionKind::getReadOnly());
|
||||
OutStreamer.SwitchSection(Section);
|
||||
|
||||
// FIXME: This is nondeterminstic!
|
||||
for (DenseMap<MCSymbol*, MCSymbol*>::iterator I = TOC.begin(),
|
||||
for (MapVector<MCSymbol*, MCSymbol*>::iterator I = TOC.begin(),
|
||||
E = TOC.end(); I != E; ++I) {
|
||||
OutStreamer.EmitLabel(I->second);
|
||||
MCSymbol *S = OutContext.GetOrCreateSymbol(I->first->getName());
|
||||
|
Loading…
Reference in New Issue
Block a user