[llvm-commits] [llvm] r159916 - in /llvm/trunk/include/llvm: Attributes.h Support/SMLoc.h

Benjamin Kramer benny.kra at googlemail.com
Sun Jul 8 12:47:52 PDT 2012


Author: d0k
Date: Sun Jul  8 14:47:51 2012
New Revision: 159916

URL: http://llvm.org/viewvc/llvm-project?rev=159916&view=rev
Log:
Remove some trivial copy ctors so the classes become trivially copyable and get the optimized SmallVector implementation.

Modified:
    llvm/trunk/include/llvm/Attributes.h
    llvm/trunk/include/llvm/Support/SMLoc.h

Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=159916&r1=159915&r2=159916&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Sun Jul  8 14:47:51 2012
@@ -46,14 +46,9 @@
   Attributes() : Bits(0) { }
   explicit Attributes(uint64_t Val) : Bits(Val) { }
   /*implicit*/ Attributes(Attribute::AttrConst Val) : Bits(Val.v) { }
-  Attributes(const Attributes &Attrs) : Bits(Attrs.Bits) { }
   // This is a "safe bool() operator".
   operator const void *() const { return Bits ? this : 0; }
   bool isEmptyOrSingleton() const { return (Bits & (Bits - 1)) == 0; }
-  Attributes &operator = (const Attributes &Attrs) {
-    Bits = Attrs.Bits;
-    return *this;
-  }
   bool operator == (const Attributes &Attrs) const {
     return Bits == Attrs.Bits;
   }

Modified: llvm/trunk/include/llvm/Support/SMLoc.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/SMLoc.h?rev=159916&r1=159915&r2=159916&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/SMLoc.h (original)
+++ llvm/trunk/include/llvm/Support/SMLoc.h Sun Jul  8 14:47:51 2012
@@ -24,7 +24,6 @@
   const char *Ptr;
 public:
   SMLoc() : Ptr(0) {}
-  SMLoc(const SMLoc &RHS) : Ptr(RHS.Ptr) {}
 
   bool isValid() const { return Ptr != 0; }
 





More information about the llvm-commits mailing list