aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/IR/Attributes.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-10 10:12:06 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-10 10:12:06 +0000
commit87de71cb9f12d874e88d4f314ab245985c1b36bc (patch)
tree8e0a1b7afcc9f2ad4922cb6d65cad08c789a60dc /include/llvm/IR/Attributes.h
parentb7cfac32f32f17e64a5addfdb833702160650f14 (diff)
downloadexternal_llvm-87de71cb9f12d874e88d4f314ab245985c1b36bc.zip
external_llvm-87de71cb9f12d874e88d4f314ab245985c1b36bc.tar.gz
external_llvm-87de71cb9f12d874e88d4f314ab245985c1b36bc.tar.bz2
Add 'empty' query methods to the builder and use them in the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IR/Attributes.h')
-rw-r--r--include/llvm/IR/Attributes.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h
index 38f4ed9..2a0363c 100644
--- a/include/llvm/IR/Attributes.h
+++ b/include/llvm/IR/Attributes.h
@@ -471,6 +471,8 @@ public:
const_iterator begin() const { return Attrs.begin(); }
const_iterator end() const { return Attrs.end(); }
+ bool empty() const { return Attrs.empty(); }
+
// Iterators for target-dependent attributes.
typedef std::pair<std::string, std::string> td_type;
typedef std::map<std::string, std::string>::iterator td_iterator;
@@ -482,6 +484,8 @@ public:
td_const_iterator td_begin() const { return TargetDepAttrs.begin(); }
td_const_iterator td_end() const { return TargetDepAttrs.end(); }
+ bool td_empty() const { return TargetDepAttrs.empty(); }
+
/// \brief Remove attributes that are used on functions only.
void removeFunctionOnlyAttrs() {
removeAttribute(Attribute::NoReturn)