From dfb8b95c2d94d71ec8dd6aae27130b5b485b4718 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 24 Feb 2002 23:01:50 +0000 Subject: [PATCH] * Silence signed/unsigned warnings * Make it compile with GCC 3.0.4 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1787 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/InstrSched/InstrScheduling.cpp | 4 ++-- lib/CodeGen/InstrSched/SchedPriorities.h | 3 ++- lib/Target/SparcV9/InstrSched/InstrScheduling.cpp | 4 ++-- lib/Target/SparcV9/InstrSched/SchedPriorities.h | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/CodeGen/InstrSched/InstrScheduling.cpp b/lib/CodeGen/InstrSched/InstrScheduling.cpp index edf84d4cadc..dafa8353bb3 100644 --- a/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -161,7 +161,7 @@ public: // accessor functions to query chosen schedule } inline InstrGroup* getIGroup (cycles_t c) { - if (c >= groups.size()) + if ((unsigned)c >= groups.size()) groups.resize(c+1); if (groups[c] == NULL) groups[c] = new InstrGroup(nslots); @@ -169,7 +169,7 @@ public: // accessor functions to query chosen schedule } inline const InstrGroup* getIGroup (cycles_t c) const { - assert(c < groups.size()); + assert((unsigned)c < groups.size()); return groups[c]; } diff --git a/lib/CodeGen/InstrSched/SchedPriorities.h b/lib/CodeGen/InstrSched/SchedPriorities.h index 7cfc4c0f354..52b5b9f0080 100644 --- a/lib/CodeGen/InstrSched/SchedPriorities.h +++ b/lib/CodeGen/InstrSched/SchedPriorities.h @@ -26,7 +26,8 @@ #include "llvm/Target/MachineSchedInfo.h" #include "Support/CommandLine.h" #include -#include +#include +#include class Method; class MachineInstr; class SchedulingManager; diff --git a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp index edf84d4cadc..dafa8353bb3 100644 --- a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp +++ b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp @@ -161,7 +161,7 @@ public: // accessor functions to query chosen schedule } inline InstrGroup* getIGroup (cycles_t c) { - if (c >= groups.size()) + if ((unsigned)c >= groups.size()) groups.resize(c+1); if (groups[c] == NULL) groups[c] = new InstrGroup(nslots); @@ -169,7 +169,7 @@ public: // accessor functions to query chosen schedule } inline const InstrGroup* getIGroup (cycles_t c) const { - assert(c < groups.size()); + assert((unsigned)c < groups.size()); return groups[c]; } diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.h b/lib/Target/SparcV9/InstrSched/SchedPriorities.h index 7cfc4c0f354..52b5b9f0080 100644 --- a/lib/Target/SparcV9/InstrSched/SchedPriorities.h +++ b/lib/Target/SparcV9/InstrSched/SchedPriorities.h @@ -26,7 +26,8 @@ #include "llvm/Target/MachineSchedInfo.h" #include "Support/CommandLine.h" #include -#include +#include +#include class Method; class MachineInstr; class SchedulingManager;