Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc...
[oota-llvm.git] / include / llvm / ParameterAttributes.h
index b66f991084c3e851a386c770b2ef54ccf546d8c6..31f9eb4a0808f494009adc125e4499e2f4ff4c5c 100644 (file)
@@ -52,11 +52,8 @@ const uint16_t ParameterOnly = ByVal | InReg | Nest | StructRet;
 /// @brief Attributes that only apply to function return values.
 const uint16_t ReturnOnly = NoReturn | NoUnwind | ReadNone | ReadOnly;
 
-/// @brief Attributes that only apply to integers.
-const uint16_t IntegerTypeOnly = SExt | ZExt;
-
-/// @brief Attributes that only apply to pointers.
-const uint16_t PointerTypeOnly = ByVal | Nest | NoAlias | StructRet;
+/// @brief Parameter attributes that do not apply to vararg call arguments.
+const uint16_t VarArgsIncompatible = StructRet;
 
 /// @brief Attributes that are mutually incompatible.
 const uint16_t MutuallyIncompatible[3] = {
@@ -65,8 +62,8 @@ const uint16_t MutuallyIncompatible[3] = {
   ReadNone | ReadOnly
 };
 
-/// @brief Which of the given attributes do not apply to the type.
-uint16_t incompatibleWithType (const Type *Ty, uint16_t attrs);
+/// @brief Which attributes cannot be applied to a type.
+uint16_t typeIncompatible (const Type *Ty);
 
 } // end namespace ParamAttr
 
@@ -174,6 +171,12 @@ class ParamAttrsList : public FoldingSetNode {
       return getParamAttrs(i) & attr;
     }
 
+    /// This returns whether the given attribute is set for at least one
+    /// parameter or for the return value.
+    /// @returns true if the parameter attribute is set somewhere
+    /// @brief Determine if a ParameterAttributes is set somewhere
+    bool hasAttrSomewhere(ParameterAttributes attr) const;
+
     /// The set of ParameterAttributes set in Attributes is converted to a
     /// string of equivalent mnemonics. This is, presumably, for writing out
     /// the mnemonics for the assembly writer.