diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h index 165e50e833eb..6033efd978fb 100644 --- a/llvm/include/llvm/IR/Attributes.h +++ b/llvm/include/llvm/IR/Attributes.h @@ -846,9 +846,8 @@ public: AttrBuilder &addAttribute(Attribute::AttrKind Val) { assert((unsigned)Val < Attribute::EndAttrKinds && "Attribute out of range!"); - // TODO: This should really assert isEnumAttrKind(). - assert(!Attribute::isIntAttrKind(Val) && - "Adding integer attribute without adding a value!"); + assert(Attribute::isEnumAttrKind(Val) && + "Adding integer/type attribute without an argument!"); Attrs[Val] = true; return *this; }