aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h
diff options
context:
space:
mode:
authorKarl Schimpf <kschimpf@google.com>2013-05-24 09:55:03 -0700
committerKarl Schimpf <kschimpf@google.com>2013-05-24 09:55:03 -0700
commit80b7ba7480724c773b96da24999d817b6b46ef29 (patch)
tree6b7dba38623ef94b89b43f7cba898c1b8017294f /lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h
parent501900058c0815d35e630d416e3d4e1373b75b9c (diff)
Make abbreviations explicit in pnacl-freeze/thaw.
[1] Explicitly enumerate all abbreviation values, including the maximum abbreviation for each type of block. [2] Make "enter subblock" calculate number of bits needed by passing in maximum abbreviation (associated with block) rather than requiring the developer to compute this value every time a subblock is entered. *NOTE* This code changes encoding sizes to be based on the maximum allowed value, rather than requiring the developer to calculate out the number of bits needed. This change doesn't make the PNaCL bitcode files incompatable with LLVM bitcode files, since it does not effect the bitcode reader. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3405 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/14813032
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h')
-rw-r--r--lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h
index f6e3e94841..f3d36862c3 100644
--- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h
+++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h
@@ -237,8 +237,6 @@ public:
/// @returns true if an error occurred.
bool ParseTriple(std::string &Triple);
- static uint64_t decodeSignRotatedValue(uint64_t V);
-
private:
Type *getTypeByID(unsigned ID);
Value *getFnValueByID(unsigned ID, Type *Ty) {
@@ -315,7 +313,7 @@ private:
Value *getValueSigned(SmallVector<uint64_t, 64> &Record, unsigned Slot,
unsigned InstNum, Type *Ty) {
if (Slot == Record.size()) return 0;
- unsigned ValNo = (unsigned)decodeSignRotatedValue(Record[Slot]);
+ unsigned ValNo = (unsigned) NaClDecodeSignRotatedValue(Record[Slot]);
// Adjust the ValNo, if it was encoded relative to the InstNum.
if (UseRelativeIDs)
ValNo = InstNum - ValNo;