summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2013-01-20 01:06:48 +0000
committerChris Lattner <sabre@nondot.org>2013-01-20 01:06:48 +0000
commit194ef24dfedf62642c853a851db4d7e528d27460 (patch)
treea84711cd83f049ebe3cd165744e1738a262acbb8 /include/llvm/Bitcode
parentf84b7500ce489d2e4039348ed30bf584f0b61973 (diff)
downloadllvm-194ef24dfedf62642c853a851db4d7e528d27460.tar.gz
llvm-194ef24dfedf62642c853a851db4d7e528d27460.tar.bz2
llvm-194ef24dfedf62642c853a851db4d7e528d27460.tar.xz
stringref'ize readRecord and properly capitalize it. Add a compatibility method to easy
the transition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index d6d9e34868..3e8d880da4 100644
--- a/include/llvm/Bitcode/BitstreamReader.h
+++ b/include/llvm/Bitcode/BitstreamReader.h
@@ -506,9 +506,20 @@ public:
/// skipRecord - Read the current record and discard it.
void skipRecord(unsigned AbbrevID);
+ unsigned readRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals,
+ StringRef *Blob = 0);
+
unsigned ReadRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals,
- const char **BlobStart = 0, unsigned *BlobLen = 0);
-
+ const char **BlobStart = 0, unsigned *BlobLen = 0) {
+ if (!BlobStart)
+ return readRecord(AbbrevID, Vals);
+ StringRef S;
+ unsigned X = readRecord(AbbrevID, Vals, &S);
+ *BlobStart = S.data();
+ *BlobLen = S.size();
+ return X;
+ }
+
unsigned ReadRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals,
const char *&BlobStart, unsigned &BlobLen) {
return ReadRecord(AbbrevID, Vals, &BlobStart, &BlobLen);