[ldc/f14/master] add patch

MERCIER Jonathan bioinfornatics at fedoraproject.org
Thu Aug 5 21:00:20 UTC 2010


commit 9dbdec6e5f4e58e4f79bd8b27222d79158ae552b
Author: bioinfornatics <bioinfornatics at gmail.com>
Date:   Thu Aug 5 23:00:05 2010 +0200

    add patch

 ldc-0.9.2-fix.patch |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/ldc-0.9.2-fix.patch b/ldc-0.9.2-fix.patch
new file mode 100644
index 0000000..65fdeb8
--- /dev/null
+++ b/ldc-0.9.2-fix.patch
@@ -0,0 +1,33 @@
+diff -up ./gen/structs.cpp.fix ./gen/structs.cpp
+--- ./gen/structs.cpp.fix	2010-08-03 23:03:21.651564567 +0200
++++ ./gen/structs.cpp	2010-08-03 23:07:07.298449520 +0200
+@@ -3,6 +3,7 @@
+ #include "gen/llvm.h"
+ #include "llvm/AbstractTypeUser.h"
+ #include "llvm/ADT/DenseMap.h"
++#include "llvm/Support/ManagedStatic.h"
+ 
+ #include "mtype.h"
+ #include "aggregate.h"
+@@ -341,9 +342,9 @@ LLType* DtoUnpaddedStructType(Type* dty)
+     assert(dty->ty == Tstruct);
+     
+     typedef llvm::DenseMap<Type*, llvm::PATypeHolder> CacheT;
+-    static CacheT cache;
+-    CacheT::iterator it = cache.find(dty);
+-    if (it != cache.end())
++    static llvm::ManagedStatic<CacheT> cache;
++    CacheT::iterator it = cache->find(dty);
++    if (it != cache->end())
+         return it->second;
+     
+     TypeStruct* sty = (TypeStruct*) dty;
+@@ -363,7 +364,7 @@ LLType* DtoUnpaddedStructType(Type* dty)
+         types.push_back(fty);
+     }
+     LLType* Ty = LLStructType::get(gIR->context(), types);
+-    cache.insert(std::make_pair(dty, Ty));
++    cache->insert(std::make_pair(dty, Ty));
+     return Ty;
+ }
+ 


More information about the scm-commits mailing list