Fix type to avoid problems on 32-bit builds
authorTeresa Johnson <tejohnson@google.com>
Fri, 12 Aug 2016 14:55:43 +0000 (14:55 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 12 Aug 2016 14:55:43 +0000 (14:55 +0000)
lto::InputFile::Symbol::getCommonSize should return uint64_t instead of
size_t since it is returning the result of DataLayout::getTypeAllocSize
which returns uint64_t, and the result of getCommonSize is assigned to a
uint64_t variable. On 32-bit builds size_t is unsigned int and there are
type errors. This was introduced in r278338.

llvm-svn: 278512

llvm/include/llvm/LTO/LTO.h

index aa92bc8..aef3643 100644 (file)
@@ -178,7 +178,7 @@ public:
         return GV->getComdat();
       return nullptr;
     }
-    size_t getCommonSize() const {
+    uint64_t getCommonSize() const {
       assert(Flags & object::BasicSymbolRef::SF_Common);
       if (!GV)
         return 0;