diff options
author | Alp Toker <alp@nuanti.com> | 2013-11-23 23:06:20 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-11-23 23:06:20 +0000 |
commit | 2b5c552550222274650bf3b391745e462f09ca8a (patch) | |
tree | 4de623acff2a8bfdfd1e446c9ff48d42736f360a /include | |
parent | e510665548d7291b7e935a17514f9380b770e26c (diff) | |
download | llvm-2b5c552550222274650bf3b391745e462f09ca8a.tar.gz llvm-2b5c552550222274650bf3b391745e462f09ca8a.tar.bz2 llvm-2b5c552550222274650bf3b391745e462f09ca8a.tar.xz |
Put an unused result attribute on SmallSet::empty()
This matches other empty() container functions in LLVM.
No actual usage problems discovered in this instance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/SmallSet.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallSet.h b/include/llvm/ADT/SmallSet.h index 5dfe924f6d..ecd3843cd0 100644 --- a/include/llvm/ADT/SmallSet.h +++ b/include/llvm/ADT/SmallSet.h @@ -39,7 +39,10 @@ class SmallSet { public: SmallSet() {} - bool empty() const { return Vector.empty() && Set.empty(); } + bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { + return Vector.empty() && Set.empty(); + } + unsigned size() const { return isSmall() ? Vector.size() : Set.size(); } |