aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
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; }