summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-02-29 20:31:01 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-02-29 20:31:01 +0000
commit02a248afe310c86aea682302fc587f22bb999fa7 (patch)
treeaff81294afe5ff74d4dfcd7dd40b906a511e764f /include/llvm/Bitcode
parentfdc8f785cd52a4438d5bf914594253b7787ab80e (diff)
downloadllvm-02a248afe310c86aea682302fc587f22bb999fa7.tar.gz
llvm-02a248afe310c86aea682302fc587f22bb999fa7.tar.bz2
llvm-02a248afe310c86aea682302fc587f22bb999fa7.tar.xz
BitcodeWriter: Expose less implementation details -- make BackpatchWord private
and remove getBuffer(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r--include/llvm/Bitcode/BitstreamWriter.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h
index 41e3e0898e..250a20fde2 100644
--- a/include/llvm/Bitcode/BitstreamWriter.h
+++ b/include/llvm/Bitcode/BitstreamWriter.h
@@ -59,6 +59,15 @@ class BitstreamWriter {
};
std::vector<BlockInfo> BlockInfoRecords;
+ // BackpatchWord - Backpatch a 32-bit word in the output with the specified
+ // value.
+ void BackpatchWord(unsigned ByteNo, unsigned NewWord) {
+ Out[ByteNo++] = (unsigned char)(NewWord >> 0);
+ Out[ByteNo++] = (unsigned char)(NewWord >> 8);
+ Out[ByteNo++] = (unsigned char)(NewWord >> 16);
+ Out[ByteNo ] = (unsigned char)(NewWord >> 24);
+ }
+
public:
explicit BitstreamWriter(std::vector<unsigned char> &O)
: Out(O), CurBit(0), CurValue(0), CurCodeSize(2) {}
@@ -78,8 +87,6 @@ public:
}
}
- std::vector<unsigned char> &getBuffer() { return Out; }
-
/// \brief Retrieve the current position in the stream, in bits.
uint64_t GetCurrentBitNo() const { return Out.size() * 8 + CurBit; }
@@ -164,15 +171,6 @@ public:
Emit(Val, CurCodeSize);
}
- // BackpatchWord - Backpatch a 32-bit word in the output with the specified
- // value.
- void BackpatchWord(unsigned ByteNo, unsigned NewWord) {
- Out[ByteNo++] = (unsigned char)(NewWord >> 0);
- Out[ByteNo++] = (unsigned char)(NewWord >> 8);
- Out[ByteNo++] = (unsigned char)(NewWord >> 16);
- Out[ByteNo ] = (unsigned char)(NewWord >> 24);
- }
-
//===--------------------------------------------------------------------===//
// Block Manipulation
//===--------------------------------------------------------------------===//