[llvm] r195562 - Put an unused result attribute on SmallSet::empty()
Alp Toker
alp at nuanti.com
Sat Nov 23 15:06:20 PST 2013
Author: alp
Date: Sat Nov 23 17:06:20 2013
New Revision: 195562
URL: http://llvm.org/viewvc/llvm-project?rev=195562&view=rev
Log:
Put an unused result attribute on SmallSet::empty()
This matches other empty() container functions in LLVM.
No actual usage problems discovered in this instance.
Modified:
llvm/trunk/include/llvm/ADT/SmallSet.h
Modified: llvm/trunk/include/llvm/ADT/SmallSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallSet.h?rev=195562&r1=195561&r2=195562&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallSet.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallSet.h Sat Nov 23 17:06:20 2013
@@ -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();
}
More information about the llvm-commits
mailing list