aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-01-04 02:08:04 +0000
committerAnders Carlsson <andersca@mac.com>2009-01-04 02:08:04 +0000
commitb723f7520bcce5f13ccaae557c16a1e7133b6908 (patch)
tree3797c27d14a598c9631f226d0c0dde78b9038db2 /lib/CodeGen/CodeGenModule.h
parent5c5a7ee24270eb670881068d4baa2e2991f23214 (diff)
Fix the bug that would cause Python to crash at startup.
When emitting the static variables we need to make sure that the order is preserved. Fix this by making StaticDecls a std::list which has O(1) random removal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 3f604dd048..0bd0e2c724 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -21,6 +21,8 @@
#include "CGCall.h"
+#include <list>
+
namespace llvm {
class Module;
class Constant;
@@ -97,7 +99,7 @@ class CodeGenModule {
/// will lazily emit definitions for only the decls that were
/// actually used. This should contain only Function and Var decls,
/// and only those which actually define something.
- std::vector<const ValueDecl*> StaticDecls;
+ std::list<const ValueDecl*> StaticDecls;
/// GlobalCtors - Store the list of global constructors and their
/// respective priorities to be emitted when the translation unit is