enum AttrKind {
// IR-Level Attributes
None, ///< No attributes have been set
- AddressSafety, ///< Address safety checking is on.
Alignment, ///< Alignment of parameter (5 bits)
///< stored as log2 of alignment with +1 bias
///< 0 means unaligned (different from align(1))
StackProtectReq, ///< Stack protection required.
StackProtectStrong, ///< Strong Stack protection.
StructRet, ///< Hidden pointer to structure to return
- ThreadSafety, ///< Thread safety checking is on.
- UninitializedChecks, ///< Checking for uses of uninitialized memory is on.
+ SanitizeAddress, ///< AddressSanitizer is on.
+ SanitizeThread, ///< ThreadSanitizer is on.
+ SanitizeMemory, ///< MemorySanitizer is on.
UWTable, ///< Function must be in a unwind table
ZExt, ///< Zero extended before/after call
explicit AttributeSet(AttributeSetImpl *LI) : pImpl(LI) {}
public:
AttributeSet() : pImpl(0) {}
- AttributeSet(const AttributeSet &P) : pImpl(P.pImpl) {}
- const AttributeSet &operator=(const AttributeSet &RHS) {
- pImpl = RHS.pImpl;
- return *this;
- }
//===--------------------------------------------------------------------===//
// AttributeSet Construction and Mutation
AttributeSet addAttribute(LLVMContext &C, unsigned Idx,
Attribute::AttrKind Attr) const;
+ /// \brief Add an attribute to the attribute set at the given index. Since
+ /// attribute sets are immutable, this returns a new set.
+ AttributeSet addAttribute(LLVMContext &C, unsigned Idx,
+ StringRef Kind) const;
+
/// \brief Add attributes to the attribute set at the given index. Since
/// attribute sets are immutable, this returns a new set.
AttributeSet addAttributes(LLVMContext &C, unsigned Idx,
unsigned getStackAlignment(unsigned Index) const;
/// \brief Return the attributes at the index as a string.
- std::string getAsString(unsigned Index, bool InAttrGrp = false) const;
+ std::string getAsString(unsigned Index, bool TargetIndependent = false,
+ bool InAttrGrp = false) const;
typedef ArrayRef<Attribute>::iterator iterator;