[lld] r365434 - [LLD] NFC: Fixed GCC warning in ELF/Arch/RISCV.cpp
Denis Bakhvalov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 20:56:44 PDT 2019
Author: dendibakh
Date: Mon Jul 8 20:56:44 2019
New Revision: 365434
URL: http://llvm.org/viewvc/llvm-project?rev=365434&view=rev
Log:
[LLD] NFC: Fixed GCC warning in ELF/Arch/RISCV.cpp
GCC emits warning on this line:
error: enumeral and non-enumeral type in conditional
expression [-Werror=extra]
Change-Id: I04969cc32e27e310968b88ebaa4e1c4894528d74
Modified:
lld/trunk/ELF/Arch/RISCV.cpp
Modified: lld/trunk/ELF/Arch/RISCV.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/RISCV.cpp?rev=365434&r1=365433&r2=365434&view=diff
==============================================================================
--- lld/trunk/ELF/Arch/RISCV.cpp (original)
+++ lld/trunk/ELF/Arch/RISCV.cpp Mon Jul 8 20:56:44 2019
@@ -176,7 +176,8 @@ void RISCV::writePlt(uint8_t *Buf, uint6
}
RelType RISCV::getDynRel(RelType Type) const {
- return Type == Target->SymbolicRel ? Type : R_RISCV_NONE;
+ return Type == Target->SymbolicRel ? Type
+ : static_cast<RelType>(R_RISCV_NONE);
}
RelExpr RISCV::getRelExpr(const RelType Type, const Symbol &S,
More information about the llvm-commits
mailing list