From: Benjamin Kramer Date: Sun, 8 Jul 2012 19:47:51 +0000 (+0000) Subject: Remove some trivial copy ctors so the classes become trivially copyable and get the... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=367783223d6e3d1a421041a539172abc984b9684;p=oota-llvm.git Remove some trivial copy ctors so the classes become trivially copyable and get the optimized SmallVector implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159916 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index 950a516d0ed..59fdd993751 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -46,14 +46,9 @@ class Attributes { 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; } diff --git a/include/llvm/Support/SMLoc.h b/include/llvm/Support/SMLoc.h index 7e0811a1afc..1bf810b4aaf 100644 --- a/include/llvm/Support/SMLoc.h +++ b/include/llvm/Support/SMLoc.h @@ -24,7 +24,6 @@ class SMLoc { const char *Ptr; public: SMLoc() : Ptr(0) {} - SMLoc(const SMLoc &RHS) : Ptr(RHS.Ptr) {} bool isValid() const { return Ptr != 0; }