summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-10-27 23:01:25 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-10-27 23:01:25 +0000
commit128a9760e0c191b1d7b5e64cee0b32497639e4b1 (patch)
tree37305d1b9413b8f6dda8aa860efdede05a8903eb /llvm/lib/Bitcode
parent75bf203def49fc32b666c6a44ff87dc73292c9ab (diff)
downloadbcm5719-llvm-128a9760e0c191b1d7b5e64cee0b32497639e4b1.tar.gz
bcm5719-llvm-128a9760e0c191b1d7b5e64cee0b32497639e4b1.zip
Bitcode: Fix more unsigned integer overflow bugs.
llvm-svn: 251464
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 58b9b4a189a..e23f8176330 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -151,7 +151,7 @@ class BitcodeReader : public GVMaterializer {
// Last function offset found in the VST.
uint64_t LastFunctionBlockBit = 0;
bool SeenValueSymbolTable = false;
- unsigned VSTOffset = 0;
+ uint64_t VSTOffset = 0;
// Contains an arbitrary and optional string identifying the bitcode producer
std::string ProducerIdentification;
@@ -388,7 +388,7 @@ private:
ErrorOr<Value *> recordValue(SmallVectorImpl<uint64_t> &Record,
unsigned NameIndex, Triple &TT);
- std::error_code parseValueSymbolTable(unsigned Offset = 0);
+ std::error_code parseValueSymbolTable(uint64_t Offset = 0);
std::error_code parseConstants();
std::error_code rememberAndSkipFunctionBodies();
std::error_code rememberAndSkipFunctionBody();
@@ -1764,7 +1764,7 @@ ErrorOr<Value *> BitcodeReader::recordValue(SmallVectorImpl<uint64_t> &Record,
/// Parse the value symbol table at either the current parsing location or
/// at the given bit offset if provided.
-std::error_code BitcodeReader::parseValueSymbolTable(unsigned Offset) {
+std::error_code BitcodeReader::parseValueSymbolTable(uint64_t Offset) {
uint64_t CurrentBit;
// Pass in the Offset to distinguish between calling for the module-level
// VST (where we want to jump to the VST offset) and the function-level
OpenPOWER on IntegriCloud