From 28e1ff2c3fbc98cc35d34c0ad6678628795c142e Mon Sep 17 00:00:00 2001 From: George Rimar Date: Thu, 30 May 2019 10:42:47 +0000 Subject: [PATCH] [llvm-readobj] - An attemp to fix BB. BB failed: http://lab.llvm.org:8011/builders/clang-armv7-linux-build-cache/builds/15062/steps/build%20stage%201/logs/stdio Error was: /home/buildslave/buildslave/clang-armv7-linux-build-cache/llvm/tools/llvm-readobj/ELFDumper.cpp:3540:7: error: non-constant-expression cannot be narrowed from type 'llvm::support::detail::packed_endian_specific_integral::value_type' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] StrTabSec->sh_size}; llvm-svn: 362084 --- llvm/tools/llvm-readobj/ELFDumper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 1aea493..1012cf1 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -3524,7 +3524,7 @@ void GNUStyle::printVersionDefinitionSection(const ELFFile *Obj, const Elf_Shdr *StrTabSec = unwrapOrError(Obj->getSection(Sec->sh_link)); StringRef StringTable( reinterpret_cast(Obj->base() + StrTabSec->sh_offset), - StrTabSec->sh_size); + (size_t)StrTabSec->sh_size); const uint8_t *VerdefBuf = unwrapOrError(Obj->getSectionContents(Sec)).data(); const uint8_t *Begin = VerdefBuf; @@ -3568,7 +3568,7 @@ void GNUStyle::printVersionDependencySection(const ELFFile *Obj, const Elf_Shdr *StrTabSec = unwrapOrError(Obj->getSection(Sec->sh_link)); StringRef StringTable = { reinterpret_cast(Obj->base() + StrTabSec->sh_offset), - StrTabSec->sh_size}; + (size_t)StrTabSec->sh_size}; const uint8_t *VerneedBuf = SecData.data(); for (unsigned I = 0; I < VerneedNum; ++I) { -- 2.7.4