Revert "Remove unnecessary type casts."

This reverts commit r257080 because it caused GCC to emit "enumeral
and non-enumeral type in conditional expression" warning.

llvm-svn: 257096
This commit is contained in:
Rui Ueyama 2016-01-07 20:53:30 +00:00
parent 1300e6b15a
commit 6ffb42ad0f
1 changed files with 3 additions and 2 deletions

View File

@ -1161,7 +1161,8 @@ template <class ELFT> void MergeOutputSection<ELFT>::finalize() {
template <class ELFT>
StringTableSection<ELFT>::StringTableSection(StringRef Name, bool Dynamic)
: OutputSectionBase<ELFT>(Name, SHT_STRTAB, Dynamic ? SHF_ALLOC : 0),
: OutputSectionBase<ELFT>(Name, SHT_STRTAB,
Dynamic ? (uintX_t)SHF_ALLOC : 0),
Dynamic(Dynamic) {
this->Header.sh_addralign = 1;
}
@ -1234,7 +1235,7 @@ SymbolTableSection<ELFT>::SymbolTableSection(
SymbolTable<ELFT> &Table, StringTableSection<ELFT> &StrTabSec)
: OutputSectionBase<ELFT>(StrTabSec.isDynamic() ? ".dynsym" : ".symtab",
StrTabSec.isDynamic() ? SHT_DYNSYM : SHT_SYMTAB,
StrTabSec.isDynamic() ? SHF_ALLOC : 0),
StrTabSec.isDynamic() ? (uintX_t)SHF_ALLOC : 0),
Table(Table), StrTabSec(StrTabSec) {
this->Header.sh_entsize = sizeof(Elf_Sym);
this->Header.sh_addralign = ELFT::Is64Bits ? 8 : 4;