1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Make the EDis tables const.

llvm-svn: 150304
This commit is contained in:
Benjamin Kramer 2012-02-11 14:51:07 +00:00
parent 675a84a6ea
commit 44e872829d
7 changed files with 10 additions and 14 deletions

View File

@ -90,7 +90,7 @@ public:
/// @return - An array of instruction information, with one entry for
/// each MCInst opcode this disassembler returns.
/// NULL if there is no info for this target.
virtual EDInstInfo *getEDInfo() const { return (EDInstInfo*)0; }
virtual const EDInstInfo *getEDInfo() const { return (EDInstInfo*)0; }
private:
//

View File

@ -52,7 +52,7 @@ public:
raw_ostream &cStream) const;
/// getEDInfo - See MCDisassembler.
EDInstInfo *getEDInfo() const;
const EDInstInfo *getEDInfo() const;
private:
};
@ -77,7 +77,7 @@ public:
raw_ostream &cStream) const;
/// getEDInfo - See MCDisassembler.
EDInstInfo *getEDInfo() const;
const EDInstInfo *getEDInfo() const;
private:
mutable std::vector<unsigned> ITBlock;
DecodeStatus AddThumbPredicate(MCInst&) const;
@ -332,11 +332,11 @@ static MCDisassembler *createThumbDisassembler(const Target &T, const MCSubtarge
return new ThumbDisassembler(STI);
}
EDInstInfo *ARMDisassembler::getEDInfo() const {
const EDInstInfo *ARMDisassembler::getEDInfo() const {
return instInfoARM;
}
EDInstInfo *ThumbDisassembler::getEDInfo() const {
const EDInstInfo *ThumbDisassembler::getEDInfo() const {
return instInfoARM;
}

View File

@ -492,7 +492,7 @@ static unsigned getOPCODE(uint32_t insn) {
}
}
EDInstInfo *MBlazeDisassembler::getEDInfo() const {
const EDInstInfo *MBlazeDisassembler::getEDInfo() const {
return instInfoMBlaze;
}

View File

@ -46,7 +46,7 @@ public:
raw_ostream &cStream) const;
/// getEDInfo - See MCDisassembler.
EDInstInfo *getEDInfo() const;
const EDInstInfo *getEDInfo() const;
};
} // namespace llvm

View File

@ -82,7 +82,7 @@ X86GenericDisassembler::~X86GenericDisassembler() {
delete MII;
}
EDInstInfo *X86GenericDisassembler::getEDInfo() const {
const EDInstInfo *X86GenericDisassembler::getEDInfo() const {
return instInfoX86;
}

View File

@ -123,7 +123,7 @@ public:
raw_ostream &cStream) const;
/// getEDInfo - See MCDisassembler.
EDInstInfo *getEDInfo() const;
const EDInstInfo *getEDInfo() const;
private:
DisassemblerMode fMode;
};

View File

@ -980,11 +980,7 @@ void EDEmitter::run(raw_ostream &o) {
emitCommonEnums(o, i);
o << "namespace {\n";
o << "llvm::EDInstInfo instInfo" << target.getName().c_str() << "[] = ";
o << "static const llvm::EDInstInfo instInfo" << target.getName() << "[] = ";
infoArray.emit(o, i);
o << ";" << "\n";
o << "}\n";
}