Skip to content

Commit 28e1ff2

Browse files
author
George Rimar
committed
[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<unsigned long long, llvm::support::endianness::little, 1>::value_type' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] StrTabSec->sh_size}; llvm-svn: 362084
1 parent 9e7be9b commit 28e1ff2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/tools/llvm-readobj/ELFDumper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3524,7 +3524,7 @@ void GNUStyle<ELFT>::printVersionDefinitionSection(const ELFFile<ELFT> *Obj,
35243524
const Elf_Shdr *StrTabSec = unwrapOrError(Obj->getSection(Sec->sh_link));
35253525
StringRef StringTable(
35263526
reinterpret_cast<const char *>(Obj->base() + StrTabSec->sh_offset),
3527-
StrTabSec->sh_size);
3527+
(size_t)StrTabSec->sh_size);
35283528

35293529
const uint8_t *VerdefBuf = unwrapOrError(Obj->getSectionContents(Sec)).data();
35303530
const uint8_t *Begin = VerdefBuf;
@@ -3568,7 +3568,7 @@ void GNUStyle<ELFT>::printVersionDependencySection(const ELFFile<ELFT> *Obj,
35683568
const Elf_Shdr *StrTabSec = unwrapOrError(Obj->getSection(Sec->sh_link));
35693569
StringRef StringTable = {
35703570
reinterpret_cast<const char *>(Obj->base() + StrTabSec->sh_offset),
3571-
StrTabSec->sh_size};
3571+
(size_t)StrTabSec->sh_size};
35723572

35733573
const uint8_t *VerneedBuf = SecData.data();
35743574
for (unsigned I = 0; I < VerneedNum; ++I) {

0 commit comments

Comments
 (0)