]> granicus.if.org Git - llvm/commitdiff
Fix GCC 4 build after r364464
authorHans Wennborg <hans@hanshq.net>
Thu, 27 Jun 2019 07:32:10 +0000 (07:32 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 27 Jun 2019 07:32:10 +0000 (07:32 +0000)
It was failing with:

In file included from /b/s/w/ir/cache/builder/src/third_party/llvm/llvm/lib/Bitcode/Reader/BitstreamReader.cpp:9:0:
/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/Bitcode/BitstreamReader.h:
In member function 'llvm::Expected<long unsigned int> llvm::SimpleBitstreamCursor::ReadVBR64(unsigned int)':
/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/Bitcode/BitstreamReader.h:262:14:
error: could not convert 'MaybeRead' from 'llvm::Expected<unsigned int>' to 'llvm::Expected<long unsigned int>'
       return MaybeRead;
              ^
/b/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/Bitcode/BitstreamReader.h:279:16:
error: could not convert 'MaybeRead' from 'llvm::Expected<unsigned int>' to 'llvm::Expected<long unsigned int>'
         return MaybeRead;
                ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364504 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Bitcode/BitstreamReader.h

index acd9e741ed39160cfdbb3069c63cda617d0e787f..c8ed77fded83cec0052c1f2c555fa268d66790cc 100644 (file)
@@ -257,7 +257,7 @@ public:
   // Read a VBR that may have a value up to 64-bits in size. The chunk size of
   // the VBR must still be <= 32 bits though.
   Expected<uint64_t> ReadVBR64(unsigned NumBits) {
-    Expected<unsigned> MaybeRead = Read(NumBits);
+    Expected<uint64_t> MaybeRead = Read(NumBits);
     if (!MaybeRead)
       return MaybeRead;
     uint32_t Piece = MaybeRead.get();