diff options
author | Fangrui Song <maskray@google.com> | 2019-04-24 05:33:33 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-24 05:33:33 +0000 |
commit | 74780852dc76426058e465279a86a863b8c989e3 (patch) | |
tree | 9fc55b14a50f9f66b5934eab4ff53390ace349f3 /lld/ELF/LinkerScript.cpp | |
parent | 5a235865f7211563e69ba15d6d60aca9c3a20592 (diff) | |
download | bcm5719-llvm-74780852dc76426058e465279a86a863b8c989e3.tar.gz bcm5719-llvm-74780852dc76426058e465279a86a863b8c989e3.zip |
[ELF] Fix a gcc -Wextra warning
Extracted from D61046.
warning: enumeral and non-enumeral type in conditional expression [-Wextra]
Cast SHF_ALLOC to avoid that.
llvm-svn: 359070
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r-- | lld/ELF/LinkerScript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 006b962c624..da6dc824a69 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -887,8 +887,8 @@ void LinkerScript::adjustSectionsBeforeSorting() { // in case it is empty. bool IsEmpty = getInputSections(Sec).empty(); if (IsEmpty) - Sec->Flags = - Flags & ((Sec->NonAlloc ? 0 : SHF_ALLOC) | SHF_WRITE | SHF_EXECINSTR); + Sec->Flags = Flags & ((Sec->NonAlloc ? 0 : (uint64_t)SHF_ALLOC) | + SHF_WRITE | SHF_EXECINSTR); if (IsEmpty && isDiscardable(*Sec)) { Sec->Live = false; |