aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-23 18:17:44 +0000
committerChris Lattner <sabre@nondot.org>2009-02-23 18:17:44 +0000
commit01011d4e4d6d5146f58233a508509757382d62c3 (patch)
tree9cc15627dfd01e07b8d26ace2db543e59bb860a1 /lib/AST/DeclBase.cpp
parentf9a8e2e1cf087c1720397e3d6d0c9b77a18787ef (diff)
Add copy assignment operator, caught by doug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65331 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r--lib/AST/DeclBase.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index eda1e33ba6..18712cde35 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -290,6 +290,15 @@ public:
delete &getVector();
}
+ StoredDeclsList &operator=(const StoredDeclsList &RHS) {
+ if (isVector())
+ delete &getVector();
+ Data = RHS.Data;
+ if (isVector())
+ Data.setPointer(new VectorTy(getVector()));
+ return *this;
+ }
+
bool isVector() const { return Data.getInt() != 0; }
bool isInline() const { return Data.getInt() == 0; }
bool isNull() const { return Data.getPointer() == 0; }