aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Naumann <Axel.Naumann@cern.ch>2011-05-06 15:24:04 +0000
committerAxel Naumann <Axel.Naumann@cern.ch>2011-05-06 15:24:04 +0000
commit54ec6c59d8b2e529fc3f07ae97415721f394ad92 (patch)
tree35e42301edf6b0dd3ffad2bade4a512960f3349b
parent359cf927cf4980099a04b3f3cf040b81d181fe3d (diff)
Reset the emitted initializers.
This enables incremental codegen, where the initializer array can be removed from the module, such that only new initializers will be emitted and run. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130986 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGDeclCXX.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp
index 45b0b969be..a24203c449 100644
--- a/lib/CodeGen/CGDeclCXX.cpp
+++ b/lib/CodeGen/CGDeclCXX.cpp
@@ -248,6 +248,8 @@ CodeGenModule::EmitCXXGlobalInitFunc() {
&CXXGlobalInits[0],
CXXGlobalInits.size());
AddGlobalCtor(Fn);
+ CXXGlobalInits.clear();
+ PrioritizedCXXGlobalInits.clear();
}
void CodeGenModule::EmitCXXGlobalDtorFunc() {