diff options
author | David Greene <greened@obbligato.org> | 2011-07-29 19:07:05 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-07-29 19:07:05 +0000 |
commit | 1aa0e3e1185d80c9767c71253d83e5f23c3a4973 (patch) | |
tree | ad334e7b81f3d18436329784f8937d82caf8c888 /llvm/utils/TableGen/X86RecognizableInstr.cpp | |
parent | cdd64328c7a794c3229aba52e4b5a55cb8400adc (diff) | |
download | llvm-1aa0e3e1185d80c9767c71253d83e5f23c3a4973.zip llvm-1aa0e3e1185d80c9767c71253d83e5f23c3a4973.tar.gz llvm-1aa0e3e1185d80c9767c71253d83e5f23c3a4973.tar.bz2 |
[AVX] Constify Inits
Make references to Inits const everywhere. This is the final step
before making them unique.
llvm-svn: 136485
Diffstat (limited to 'llvm/utils/TableGen/X86RecognizableInstr.cpp')
-rw-r--r-- | llvm/utils/TableGen/X86RecognizableInstr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp index 3071d8e..9984769 100644 --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -162,7 +162,7 @@ static bool isRegFormat(uint8_t form) { /// @param init - A reference to the BitsInit to be decoded. /// @return - The field, with the first bit in the BitsInit as the lowest /// order bit. -static uint8_t byteFromBitsInit(BitsInit &init) { +static uint8_t byteFromBitsInit(const BitsInit &init) { int width = init.getNumBits(); assert(width <= 8 && "Field is too large for uint8_t!"); @@ -173,7 +173,7 @@ static uint8_t byteFromBitsInit(BitsInit &init) { uint8_t ret = 0; for (index = 0; index < width; index++) { - if (static_cast<BitInit*>(init.getBit(index))->getValue()) + if (static_cast<const BitInit*>(init.getBit(index))->getValue()) ret |= mask; mask <<= 1; @@ -189,7 +189,7 @@ static uint8_t byteFromBitsInit(BitsInit &init) { /// @param name - The name of the field in the record. /// @return - The field, as translated by byteFromBitsInit(). static uint8_t byteFromRec(const Record* rec, const std::string &name) { - BitsInit* bits = rec->getValueAsBitsInit(name); + const BitsInit* bits = rec->getValueAsBitsInit(name); return byteFromBitsInit(*bits); } |