aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR/AttributeImpl.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-30 16:53:38 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-30 16:53:38 +0000
commit76f103e02164d27b41bd92a9767c7012482ba31a (patch)
tree7ddb1e4f8b2e6f315722bc39c24efef5501c3445 /lib/IR/AttributeImpl.h
parente87dadc44b1544c35e13cf48dfe167109929a944 (diff)
downloadexternal_llvm-76f103e02164d27b41bd92a9767c7012482ba31a.zip
external_llvm-76f103e02164d27b41bd92a9767c7012482ba31a.tar.gz
external_llvm-76f103e02164d27b41bd92a9767c7012482ba31a.tar.bz2
Change getSlotIndex to return unsigned.
The actual storage was already using unsigned, but the interface was using uint64_t. This is wasteful on 32 bits and looks to be the root causes of a miscompilation on Windows where a value was being sign extended to 64bits to compare with the result of getSlotIndex. Patch by Pasi Parviainen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r--lib/IR/AttributeImpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h
index b17aa43..2f7b449 100644
--- a/lib/IR/AttributeImpl.h
+++ b/lib/IR/AttributeImpl.h
@@ -228,7 +228,7 @@ public:
/// is the index of the return, parameter, or function object that the
/// attributes are applied to, not the index into the AttrNodes list where the
/// attributes reside.
- uint64_t getSlotIndex(unsigned Slot) const {
+ unsigned getSlotIndex(unsigned Slot) const {
return AttrNodes[Slot].first;
}
@@ -270,7 +270,7 @@ public:
}
// FIXME: This atrocity is temporary.
- uint64_t Raw(uint64_t Index) const;
+ uint64_t Raw(unsigned Index) const;
};
} // end llvm namespace