aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-04-01 19:47:52 +0000
committerDavide Italiano <davide@freebsd.org>2017-04-01 19:47:52 +0000
commit16fe5822f21c0b6de50c563fbbc8e2ba12495c22 (patch)
treee0c7dc1673ca7a3a039f04261d630450dde2a3fe /llvm/lib/Object/WasmObjectFile.cpp
parentdeede839f2e3a968bb524526018e3827871ca0b0 (diff)
downloadllvm-16fe5822f21c0b6de50c563fbbc8e2ba12495c22.zip
llvm-16fe5822f21c0b6de50c563fbbc8e2ba12495c22.tar.gz
llvm-16fe5822f21c0b6de50c563fbbc8e2ba12495c22.tar.bz2
[WASM] Remove other comparison of unsigned expression >= 0.
This should finally fix the GCC 7 build with -Werror. llvm-svn: 299313
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
-rw-r--r--llvm/lib/Object/WasmObjectFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index ddde859..fc1dca35 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -810,7 +810,7 @@ SubtargetFeatures WasmObjectFile::getFeatures() const {
bool WasmObjectFile::isRelocatableObject() const { return false; }
const WasmSection &WasmObjectFile::getWasmSection(DataRefImpl Ref) const {
- assert(Ref.d.a >= 0 && Ref.d.a < Sections.size());
+ assert(Ref.d.a < Sections.size());
return Sections[Ref.d.a];
}
@@ -826,8 +826,8 @@ WasmObjectFile::getWasmRelocation(const RelocationRef &Ref) const {
const wasm::WasmRelocation &
WasmObjectFile::getWasmRelocation(DataRefImpl Ref) const {
- assert(Ref.d.a >= 0 && Ref.d.a < Sections.size());
+ assert(Ref.d.a < Sections.size());
const WasmSection& Sec = Sections[Ref.d.a];
- assert(Ref.d.b >= 0 && Ref.d.b < Sec.Relocations.size());
+ assert(Ref.d.b < Sec.Relocations.size());
return Sec.Relocations[Ref.d.b];
}