diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-10-08 00:21:28 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-10-08 00:21:28 +0000 |
commit | a7b6d58f45096a7996c09ad77f8a8bafd1eca3e1 (patch) | |
tree | 04fb4e3972a6cc2133a620f7c908fec09b8d018d /llvm | |
parent | 8941142af83243ece14d49c4f7adb551aa19af82 (diff) | |
download | bcm5719-llvm-a7b6d58f45096a7996c09ad77f8a8bafd1eca3e1.tar.gz bcm5719-llvm-a7b6d58f45096a7996c09ad77f8a8bafd1eca3e1.zip |
Make <target>CodeEmitter::getBinaryCodeForInstr() a const method.
llvm-svn: 116018
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/ARM/ARMCodeEmitter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp | 6 | ||||
-rw-r--r-- | llvm/utils/TableGen/CodeEmitterGen.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp index b31ac5bad0e..1525daadfb0 100644 --- a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp @@ -74,7 +74,7 @@ namespace { /// getBinaryCodeForInstr - This function, generated by the /// CodeEmitterGenerator using TableGen, produces the binary encoding for /// machine instructions. - unsigned getBinaryCodeForInstr(const MachineInstr &MI); + unsigned getBinaryCodeForInstr(const MachineInstr &MI) const; bool runOnMachineFunction(MachineFunction &MF); diff --git a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp index 35319a473d9..908f6f08b9a 100644 --- a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp +++ b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp @@ -40,7 +40,7 @@ public: // getBinaryCodeForInstr - TableGen'erated function for getting the // binary encoding for an instruction. - unsigned getBinaryCodeForInstr(const MCInst &MI); + unsigned getBinaryCodeForInstr(const MCInst &MI) const; /// getMachineOpValue - Return binary encoding of operand. If the machine /// operand requires relocation, record the relocation and return zero. diff --git a/llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp b/llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp index 3aec07035d7..238a69005e9 100644 --- a/llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp +++ b/llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp @@ -41,12 +41,12 @@ namespace { /// CodeEmitterGenerator using TableGen, produces the binary encoding for /// machine instructions. - unsigned getBinaryCodeForInstr(const MachineInstr &MI); + unsigned getBinaryCodeForInstr(const MachineInstr &MI) const; /// getMachineOpValue - evaluates the MachineOperand of a given MachineInstr unsigned getMachineOpValue(const MachineInstr &MI, - const MachineOperand &MO); + const MachineOperand &MO) const; bool runOnMachineFunction(MachineFunction &MF); @@ -143,7 +143,7 @@ static unsigned getAlphaRegNumber(unsigned Reg) { } unsigned AlphaCodeEmitter::getMachineOpValue(const MachineInstr &MI, - const MachineOperand &MO) { + const MachineOperand &MO) const { unsigned rv = 0; // Return value; defaults to 0 for unhandled cases // or things that get fixed up later by the JIT. diff --git a/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp b/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp index 0e0483d4539..5298dda6bee 100644 --- a/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp +++ b/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp @@ -51,12 +51,12 @@ namespace { /// CodeEmitterGenerator using TableGen, produces the binary encoding for /// machine instructions. - unsigned getBinaryCodeForInstr(const MachineInstr &MI); + unsigned getBinaryCodeForInstr(const MachineInstr &MI) const; /// getMachineOpValue - evaluates the MachineOperand of a given MachineInstr unsigned getMachineOpValue(const MachineInstr &MI, - const MachineOperand &MO); + const MachineOperand &MO) const; const char *getPassName() const { return "PowerPC Machine Code Emitter"; } @@ -125,7 +125,7 @@ void PPCCodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) { } unsigned PPCCodeEmitter::getMachineOpValue(const MachineInstr &MI, - const MachineOperand &MO) { + const MachineOperand &MO) const { unsigned rv = 0; // Return value; defaults to 0 for unhandled cases // or things that get fixed up later by the JIT. diff --git a/llvm/utils/TableGen/CodeEmitterGen.cpp b/llvm/utils/TableGen/CodeEmitterGen.cpp index ac085120bf3..a039e0b1e35 100644 --- a/llvm/utils/TableGen/CodeEmitterGen.cpp +++ b/llvm/utils/TableGen/CodeEmitterGen.cpp @@ -81,7 +81,7 @@ void CodeEmitterGen::run(raw_ostream &o) { // Emit function declaration o << "unsigned " << Target.getName() << "CodeEmitter::" - << "getBinaryCodeForInstr(const MachineInstr &MI) {\n"; + << "getBinaryCodeForInstr(const MachineInstr &MI) const {\n"; // Emit instruction base values o << " static const unsigned InstBits[] = {\n"; |