[lld] r290002 - Fix compiler warning.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 15:12:58 PST 2016


Author: zturner
Date: Fri Dec 16 17:12:58 2016
New Revision: 290002

URL: http://llvm.org/viewvc/llvm-project?rev=290002&view=rev
Log:
Fix compiler warning.

Differential Revision: https://reviews.llvm.org/D27860

Modified:
    lld/trunk/ELF/Relocations.h

Modified: lld/trunk/ELF/Relocations.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.h?rev=290002&r1=290001&r2=290002&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.h (original)
+++ lld/trunk/ELF/Relocations.h Fri Dec 16 17:12:58 2016
@@ -98,7 +98,7 @@ struct RelExprMaskBuilder<Head, Tail...>
 // RelExpr's as a constant bit mask and test for membership with a
 // couple cheap bitwise operations.
 template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
-  assert(0 <= Expr && Expr < 64 && "RelExpr is too large for 64-bit mask!");
+  assert(0 <= Expr && (int)Expr < 64 && "RelExpr is too large for 64-bit mask!");
   return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
 }
 




More information about the llvm-commits mailing list