aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveInterval.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-05-05 18:30:58 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-05-05 18:30:58 +0000
commit34cd4a484e532cc463fd5a4bf59b88d13c5467c1 (patch)
treeeefdfb1d225da0317e7f7912079c430b5c3ed92c /include/llvm/CodeGen/LiveInterval.h
parentb61bfdb56e1c018f10a2c1c9fb49d7e2a78ed24e (diff)
Fix more -Wshorten-64-to-32 warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index 3fb0c1dc4e..31d6947a76 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -143,7 +143,7 @@ namespace llvm {
bool containsOneValue() const { return valnos.size() == 1; }
- unsigned getNumValNums() const { return valnos.size(); }
+ unsigned getNumValNums() const { return (unsigned)valnos.size(); }
/// getValNumInfo - Returns pointer to the specified val#.
///
@@ -168,14 +168,15 @@ namespace llvm {
VNInfo *getNextValue(unsigned MIIdx, MachineInstr *CopyMI,
BumpPtrAllocator &VNInfoAllocator) {
#ifdef __GNUC__
- unsigned Alignment = __alignof__(VNInfo);
+ unsigned Alignment = (unsigned)__alignof__(VNInfo);
#else
// FIXME: ugly.
unsigned Alignment = 8;
#endif
- VNInfo *VNI= static_cast<VNInfo*>(VNInfoAllocator.Allocate(sizeof(VNInfo),
- Alignment));
- new (VNI) VNInfo(valnos.size(), MIIdx, CopyMI);
+ VNInfo *VNI =
+ static_cast<VNInfo*>(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo),
+ Alignment));
+ new (VNI) VNInfo((unsigned)valnos.size(), MIIdx, CopyMI);
valnos.push_back(VNI);
return VNI;
}
@@ -196,7 +197,8 @@ namespace llvm {
/// addKills - Add a number of kills into the VNInfo kill vector. If this
/// interval is live at a kill point, then the kill is not added.
void addKills(VNInfo *VNI, const SmallVector<unsigned, 4> &kills) {
- for (unsigned i = 0, e = kills.size(); i != e; ++i) {
+ for (unsigned i = 0, e = static_cast<unsigned>(kills.size());
+ i != e; ++i) {
unsigned KillIdx = kills[i];
if (!liveBeforeAndAt(KillIdx)) {
SmallVector<unsigned, 4>::iterator