summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r--clang/lib/AST/DeclBase.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index eda1e33ba6e..18712cde358 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/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; }
OpenPOWER on IntegriCloud