aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2012-02-29 01:09:06 +0000
committerDerek Schuff <dschuff@google.com>2012-02-29 01:09:06 +0000
commitadef06a71458ded0716935a61b3d43d164d4df12 (patch)
treed56aeec7dde89874b58254175d112ba1e5fddcb5 /lib/MC
parent95fe7b9b7251d33ad4128603087edac70cec7c72 (diff)
downloadexternal_llvm-adef06a71458ded0716935a61b3d43d164d4df12.zip
external_llvm-adef06a71458ded0716935a61b3d43d164d4df12.tar.gz
external_llvm-adef06a71458ded0716935a61b3d43d164d4df12.tar.bz2
Make MemoryObject accessor members const again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCDisassembler/Disassembler.cpp4
-rw-r--r--lib/MC/MCDisassembler/EDDisassembler.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/MC/MCDisassembler/Disassembler.cpp b/lib/MC/MCDisassembler/Disassembler.cpp
index 3de6f64..605cf88 100644
--- a/lib/MC/MCDisassembler/Disassembler.cpp
+++ b/lib/MC/MCDisassembler/Disassembler.cpp
@@ -113,9 +113,9 @@ public:
Bytes(bytes), Size(size), BasePC(basePC) {}
uint64_t getBase() const { return BasePC; }
- uint64_t getExtent() { return Size; }
+ uint64_t getExtent() const { return Size; }
- int readByte(uint64_t Addr, uint8_t *Byte) {
+ int readByte(uint64_t Addr, uint8_t *Byte) const {
if (Addr - BasePC >= Size)
return -1;
*Byte = Bytes[Addr - BasePC];
diff --git a/lib/MC/MCDisassembler/EDDisassembler.cpp b/lib/MC/MCDisassembler/EDDisassembler.cpp
index 35cd3d7..b1f0e5b 100644
--- a/lib/MC/MCDisassembler/EDDisassembler.cpp
+++ b/lib/MC/MCDisassembler/EDDisassembler.cpp
@@ -199,8 +199,8 @@ namespace {
void *arg) : Callback(callback), Arg(arg) { }
~EDMemoryObject() { }
uint64_t getBase() const { return 0x0; }
- uint64_t getExtent() { return (uint64_t)-1; }
- int readByte(uint64_t address, uint8_t *ptr) {
+ uint64_t getExtent() const { return (uint64_t)-1; }
+ int readByte(uint64_t address, uint8_t *ptr) const {
if (!Callback)
return -1;