llvm.org GIT mirror llvm / 53ff78b
Revert r173646, "Use proper type for the index." Unfortunately, msvc miscompiles it. Investigating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173656 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 7 years ago
2 changed file(s) with 16 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
213213
214214 /// \brief The attributes for the specified index are returned. Attributes
215215 /// for the result are denoted with Idx = 0.
216 Attribute getAttributes(uint64_t Idx) const;
216 Attribute getAttributes(unsigned Idx) const;
217217
218218 /// \brief Add the specified attribute at the specified index to this
219219 /// attribute list. Since attribute lists are immutable, this returns the new
296296 AttributeSet getFnAttributes() const;
297297
298298 /// \brief Return the alignment for the specified function parameter.
299 unsigned getParamAlignment(uint64_t Idx) const;
299 unsigned getParamAlignment(unsigned Idx) const;
300300
301301 /// \brief Return true if the attribute exists at the given index.
302 bool hasAttribute(uint64_t Index, Attribute::AttrKind Kind) const;
302 bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const;
303303
304304 /// \brief Return true if attribute exists at the given index.
305 bool hasAttributes(uint64_t Index) const;
305 bool hasAttributes(unsigned Index) const;
306306
307307 /// \brief Returns the alignment field of an attribute as a byte alignment
308308 /// value.
309 unsigned getAlignment(uint64_t Index) const;
309 unsigned getAlignment(unsigned Index) const;
310310
311311 /// \brief Get the stack alignment.
312 unsigned getStackAlignment(uint64_t Index) const;
312 unsigned getStackAlignment(unsigned Index) const;
313313
314314 /// \brief Return the attributes at the index as a string.
315 std::string getAsString(uint64_t Index) const;
316
317 uint64_t Raw(uint64_t Index) const;
315 std::string getAsString(unsigned Index) const;
316
317 uint64_t Raw(unsigned Index) const;
318318
319319 /// \brief Return true if the specified attribute is set for at least one
320320 /// parameter or for the return value.
709709 return pImpl->getSlotAttributes(Slot);
710710 }
711711
712 bool AttributeSet::hasAttribute(uint64_t Index, Attribute::AttrKind Kind) const{
712 bool AttributeSet::hasAttribute(unsigned Index, Attribute::AttrKind Kind) const{
713713 return getAttributes(Index).hasAttribute(Kind);
714714 }
715715
716 bool AttributeSet::hasAttributes(uint64_t Index) const {
716 bool AttributeSet::hasAttributes(unsigned Index) const {
717717 return getAttributes(Index).hasAttributes();
718718 }
719719
720 std::string AttributeSet::getAsString(uint64_t Index) const {
720 std::string AttributeSet::getAsString(unsigned Index) const {
721721 return getAttributes(Index).getAsString();
722722 }
723723
724 unsigned AttributeSet::getParamAlignment(uint64_t Idx) const {
724 unsigned AttributeSet::getParamAlignment(unsigned Idx) const {
725725 return getAttributes(Idx).getAlignment();
726726 }
727727
728 unsigned AttributeSet::getStackAlignment(uint64_t Index) const {
728 unsigned AttributeSet::getStackAlignment(unsigned Index) const {
729729 return getAttributes(Index).getStackAlignment();
730730 }
731731
732 uint64_t AttributeSet::Raw(uint64_t Index) const {
732 uint64_t AttributeSet::Raw(unsigned Index) const {
733733 // FIXME: Remove this.
734734 return pImpl ? pImpl->Raw(Index) : 0;
735735 }
737737 /// \brief The attributes for the specified index are returned.
738738 ///
739739 /// FIXME: This shouldn't return 'Attribute'.
740 Attribute AttributeSet::getAttributes(uint64_t Idx) const {
740 Attribute AttributeSet::getAttributes(unsigned Idx) const {
741741 if (pImpl == 0) return Attribute();
742742
743743 // Loop through to find the attribute we want.