From ea59f896a672c2e1ef9f02277bce60257aa60989 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 5 Feb 2013 08:09:32 +0000 Subject: Add target-dependent versions of addAttribute/removeAttribute to AttrBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174356 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Attributes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/llvm/IR/Attributes.h') diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h index c726020ab8..61202eebef 100644 --- a/include/llvm/IR/Attributes.h +++ b/include/llvm/IR/Attributes.h @@ -20,6 +20,7 @@ #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/FoldingSet.h" #include +#include #include namespace llvm { @@ -341,6 +342,7 @@ template<> struct DenseMapInfo { /// equality, presence of attributes, etc. class AttrBuilder { DenseSet Attrs; + std::map TargetDepAttrs; uint64_t Alignment; uint64_t StackAlignment; public: @@ -361,12 +363,18 @@ public: /// \brief Add the Attribute object to the builder. AttrBuilder &addAttribute(Attribute A); + /// \brief Add the target-dependent attribute to the builder. + AttrBuilder &addAttribute(StringRef A, StringRef V); + /// \brief Remove an attribute from the builder. AttrBuilder &removeAttribute(Attribute::AttrKind Val); /// \brief Remove the attributes from the builder. AttrBuilder &removeAttributes(AttributeSet A, uint64_t Index); + /// \brief Remove the target-dependent attribute to the builder. + AttrBuilder &removeAttribute(StringRef A); + /// \brief Return true if the builder has the specified attribute. bool contains(Attribute::AttrKind A) const; -- cgit v1.2.3