2013-04-26 12:11:20 +00:00
--- ./tools/clang/lib/CodeGen/CodeGenModule.cpp 2013-04-11 09:34:53.217172752 +0200
2013-04-26 11:45:17 +00:00
+++ ./tools/clang/lib/CodeGen/CodeGenModule.cpp 2013-04-24 19:40:15.333490079 +0200
@@ -477,7 +477,7 @@
2013-04-10 11:52:26 +00:00
GlobalDtors.push_back(std::make_pair(Dtor, Priority));
}
-void CodeGenModule::EmitCtorList(const CtorList &Fns, const char *GlobalName) {
+void CodeGenModule::EmitCtorList(CtorList &Fns, const char *GlobalName) {
// Ctor function type is void()*.
llvm::FunctionType* CtorFTy = llvm::FunctionType::get(VoidTy, false);
llvm::Type *CtorPFTy = llvm::PointerType::getUnqual(CtorFTy);
2013-04-26 11:45:17 +00:00
@@ -503,6 +503,7 @@
2013-04-10 11:52:26 +00:00
llvm::ConstantArray::get(AT, Ctors),
GlobalName);
}
+ Fns.clear();
}
llvm::GlobalValue::LinkageTypes
2013-04-26 12:11:20 +00:00
--- ./tools/clang/lib/CodeGen/CodeGenModule.h 2013-04-11 09:34:53.233172585 +0200
2013-04-26 11:45:17 +00:00
+++ ./tools/clang/lib/CodeGen/CodeGenModule.h 2013-04-24 19:40:15.325490142 +0200
@@ -1035,8 +1035,8 @@
2013-04-10 11:52:26 +00:00
/// EmitCtorList - Generates a global array of functions and priorities using
/// the given list and name. This array will have appending linkage and is
- /// suitable for use as a LLVM constructor or destructor array.
- void EmitCtorList(const CtorList &Fns, const char *GlobalName);
+ /// suitable for use as a LLVM constructor or destructor array. Clears Fns.
+ void EmitCtorList(CtorList &Fns, const char *GlobalName);
/// EmitFundamentalRTTIDescriptor - Emit the RTTI descriptors for the
/// given type.