aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ParameterAttributes.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-11-27 13:23:08 +0000
committerDuncan Sands <baldrick@free.fr>2007-11-27 13:23:08 +0000
commitdc024674ff96820d6020757b48d47f46d4c07db2 (patch)
tree843dfcaeb8f6c99de930a32020148b563005c2fd /include/llvm/ParameterAttributes.h
parentf19341dec7361451f100a882a023b14583454d7e (diff)
downloadexternal_llvm-dc024674ff96820d6020757b48d47f46d4c07db2.zip
external_llvm-dc024674ff96820d6020757b48d47f46d4c07db2.tar.gz
external_llvm-dc024674ff96820d6020757b48d47f46d4c07db2.tar.bz2
Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ParameterAttributes.h')
-rw-r--r--include/llvm/ParameterAttributes.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/ParameterAttributes.h b/include/llvm/ParameterAttributes.h
index 1dd98ea..79b5d0c 100644
--- a/include/llvm/ParameterAttributes.h
+++ b/include/llvm/ParameterAttributes.h
@@ -77,7 +77,7 @@ const uint16_t MutuallyIncompatible[3] = {
/// with a parameter index.
/// @brief ParameterAttributes with a parameter index.
struct ParamAttrsWithIndex {
- uint16_t attrs; ///< The attributes that are set, |'d together
+ uint16_t attrs; ///< The attributes that are set, or'd together
uint16_t index; ///< Index of the parameter for which the attributes apply
static ParamAttrsWithIndex get(uint16_t idx, uint16_t attrs) {
@@ -219,6 +219,13 @@ class ParamAttrsList : public FoldingSetNode {
/// @brief Return the number of parameter attributes this type has.
unsigned size() const { return attrs.size(); }
+ /// @brief Return the number of references to this ParamAttrsList.
+ unsigned numRefs() const { return refCount; }
+
+ /// @}
+ /// @name Mutators
+ /// @{
+ public:
/// Classes retaining references to ParamAttrsList objects should call this
/// method to increment the reference count. This ensures that the
/// ParamAttrsList object will not disappear until the class drops it.