diff options
author | Anders Carlsson <andersca@mac.com> | 2009-01-04 02:08:04 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-01-04 02:08:04 +0000 |
commit | 762e162284e0633e3a006c589812d168189b9a2e (patch) | |
tree | 4bfc006abecfe7d3b47fb4304ae061ddb0e9404a /clang/lib/CodeGen/CodeGenModule.h | |
parent | ac79602005adcadfa2ff2de86320b26058f53f37 (diff) | |
download | bcm5719-llvm-762e162284e0633e3a006c589812d168189b9a2e.tar.gz bcm5719-llvm-762e162284e0633e3a006c589812d168189b9a2e.zip |
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.
llvm-svn: 61621
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 3f604dd048b..0bd0e2c724f 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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 |