[X86] Add support for tbyte memory operand size for Intel-syntax x86 assembly
[oota-llvm.git] / include / llvm / ADT / SetVector.h
index d2f7286c2596d66496ebc0018fc7e8865b9d61d8..a7fd408c854a743db3d320d4ac467fc305add151 100644 (file)
@@ -100,7 +100,7 @@ public:
   /// \brief Insert a new element into the SetVector.
   /// \returns true iff the element was inserted into the SetVector.
   bool insert(const value_type &X) {
-    bool result = set_.insert(X);
+    bool result = set_.insert(X).second;
     if (result)
       vector_.push_back(X);
     return result;
@@ -110,7 +110,7 @@ public:
   template<typename It>
   void insert(It Start, It End) {
     for (; Start != End; ++Start)
-      if (set_.insert(*Start))
+      if (set_.insert(*Start).second)
         vector_.push_back(*Start);
   }
 
@@ -170,7 +170,7 @@ public:
     vector_.pop_back();
   }
   
-  T pop_back_val() {
+  T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() {
     T Ret = back();
     pop_back();
     return Ret;
@@ -195,11 +195,10 @@ private:
     set_type &set_;
 
   public:
-    typedef typename UnaryPredicate::argument_type argument_type;
-
     TestAndEraseFromSet(UnaryPredicate P, set_type &set_) : P(P), set_(set_) {}
 
-    bool operator()(argument_type Arg) {
+    template <typename ArgumentT>
+    bool operator()(const ArgumentT &Arg) {
       if (P(Arg)) {
         set_.erase(Arg);
         return true;